Example usage for org.apache.commons.lang3.mutable MutableDouble MutableDouble

List of usage examples for org.apache.commons.lang3.mutable MutableDouble MutableDouble

Introduction

In this page you can find the example usage for org.apache.commons.lang3.mutable MutableDouble MutableDouble.

Prototype

public MutableDouble(final String value) throws NumberFormatException 

Source Link

Document

Constructs a new MutableDouble parsing the given string.

Usage

From source file:com.quinsoft.swauopencuas.mSAProf_Object.java

public int omSAProf_dTotalSACredits(View mSAProf, String InternalEntityStructure,
        String InternalAttribStructure, Integer GetOrSetFlag) {
    zVIEW mSAProf2 = new zVIEW();
    //:DECIMAL dAmount 
    double dAmount = 0.0;
    int RESULT = 0;
    double dTempDecimal_0 = 0.0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF zDERIVED_GET:
    case zDERIVED_GET:
        //:CreateViewFromView ( mSAProf2, mSAProf )
        CreateViewFromView(mSAProf2, mSAProf);
        //:IF mSAProf2.StudentAccountProfile.BalanceForward < 0 
        if (CompareAttributeToInteger(mSAProf2, "StudentAccountProfile", "BalanceForward", 0) < 0) {
            //:dAmount = mSAProf2.StudentAccountProfile.BalanceForward 
            {//from  www .j  a v a  2s .  c  om
                MutableDouble md_dAmount = new MutableDouble(dAmount);
                GetDecimalFromAttribute(md_dAmount, mSAProf2, "StudentAccountProfile", "BalanceForward");
                dAmount = md_dAmount.doubleValue();
            }
            //:ELSE 
        } else {
            //:dAmount = 0
            dAmount = 0;
        }

        //:END
        //:FOR EACH mSAProf2.StudentAccountTransApplied  
        //:      WHERE mSAProf2.StudentAccountTransApplied.Amount < 0
        RESULT = SetCursorFirstEntity(mSAProf2, "StudentAccountTransApplied", "");
        while (RESULT > zCURSOR_UNCHANGED) {
            if (CompareAttributeToInteger(mSAProf2, "StudentAccountTransApplied", "Amount", 0) < 0) {
                //:dAmount = dAmount + mSAProf2.StudentAccountTransApplied.Amount 
                {
                    MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                    GetDecimalFromAttribute(md_dTempDecimal_0, mSAProf2, "StudentAccountTransApplied",
                            "Amount");
                    dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
                }
                dAmount = dAmount + dTempDecimal_0;
            }

            RESULT = SetCursorNextEntity(mSAProf2, "StudentAccountTransApplied", "");
        }

        //:END 
        //:DropView( mSAProf2 ) 
        DropView(mSAProf2);
        //:StoreValueInRecord( mSAProf, InternalEntityStructure, 
        //:                    InternalAttribStructure, dAmount, 0 )
        StoreValueInRecord(mSAProf, InternalEntityStructure, InternalAttribStructure, dAmount, 0);
        break;
    //:   /* end zDERIVED_GET */
    //:OF zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:      /* end zDERIVED_SET */
    //:END   /* case */
    return (0);
    // END
}

From source file:com.quinsoft.swauopencuas.ZGLOBAL2_Operation.java

public void ComputeNewHighExamScoreSAT(MutableDouble ReturnedScore, View mProspct) {
    zVIEW mProspct2 = new zVIEW();
    //:DECIMAL dHighMath
    double dHighMath = 0.0;
    //:DECIMAL dHighVerbal 
    double dHighVerbal = 0.0;
    //:DECIMAL dHighWriting
    double dHighWriting = 0.0;
    //:DECIMAL dTotal 
    double dTotal = 0.0;
    int RESULT = 0;

    //:// Compute the highest total score for SAT exams for any object that has the ExamHistory subobject.
    //:CreateViewFromView( mProspct2, mProspct )
    CreateViewFromView(mProspct2, mProspct);
    //:dHighMath    = 0
    dHighMath = 0;//from ww  w. j  a v a  2 s  . c o  m
    //:dHighVerbal  = 0
    dHighVerbal = 0;
    //:dHighWriting = 0
    dHighWriting = 0;
    //:FOR EACH  mProspct2.ExamHistory 
    RESULT = SetCursorFirstEntity(mProspct2, "ExamHistory", "");
    while (RESULT > zCURSOR_UNCHANGED) {
        //:IF  mProspct2.ExamHistory.ExamType = "SAT" AND mProspct2.ExamHistory.Writing != ""
        if (CompareAttributeToString(mProspct2, "ExamHistory", "ExamType", "SAT") == 0
                && CompareAttributeToString(mProspct2, "ExamHistory", "Writing", "") != 0) {
            //:IF  mProspct2.ExamHistory.MathQuantitative > dHighMath  
            if (CompareAttributeToDecimal(mProspct2, "ExamHistory", "MathQuantitative", dHighMath) > 0) {
                //:dHighMath = mProspct2.ExamHistory.MathQuantitative 
                {
                    MutableDouble md_dHighMath = new MutableDouble(dHighMath);
                    GetDecimalFromAttribute(md_dHighMath, mProspct2, "ExamHistory", "MathQuantitative");
                    dHighMath = md_dHighMath.doubleValue();
                }
            }

            //:END 
            //:IF mProspct2.ExamHistory.Verbal > dHighVerbal  
            if (CompareAttributeToDecimal(mProspct2, "ExamHistory", "Verbal", dHighVerbal) > 0) {
                //:dHighVerbal = mProspct2.ExamHistory.Verbal 
                {
                    MutableDouble md_dHighVerbal = new MutableDouble(dHighVerbal);
                    GetDecimalFromAttribute(md_dHighVerbal, mProspct2, "ExamHistory", "Verbal");
                    dHighVerbal = md_dHighVerbal.doubleValue();
                }
            }

            //:END 
            //:IF mProspct2.ExamHistory.Writing > dHighWriting  
            if (CompareAttributeToDecimal(mProspct2, "ExamHistory", "Writing", dHighWriting) > 0) {
                //:dHighWriting = mProspct2.ExamHistory.Writing 
                {
                    MutableDouble md_dHighWriting = new MutableDouble(dHighWriting);
                    GetDecimalFromAttribute(md_dHighWriting, mProspct2, "ExamHistory", "Writing");
                    dHighWriting = md_dHighWriting.doubleValue();
                }
            }

            //:END 
        }

        RESULT = SetCursorNextEntity(mProspct2, "ExamHistory", "");
        //:END
    }

    //:END
    //:dTotal = dHighMath + dHighVerbal + dHighWriting
    dTotal = dHighMath + dHighVerbal + dHighWriting;
    //:ReturnedScore = dTotal
    ReturnedScore.setValue(dTotal);
    //:DropView( mProspct2 )
    DropView(mProspct2);
    return;
    // END
}

From source file:com.quinsoft.zencas.mFAProf_Object.java

public int omFAProf_GenerateAwardsByGroup(View mFAProf) {
    zVIEW mAdmDiv = new zVIEW();
    //:VIEW wXferO   REGISTERED AS wXferO
    zVIEW wXferO = new zVIEW();
    int RESULT = 0;
    //:VIEW mFAConst BASED ON LOD  mFAConst
    zVIEW mFAConst = new zVIEW();
    //:STRING ( 30 ) szString
    String szString = null;/*from   w  w  w  . ja v  a  2  s . com*/
    //:STRING ( 8  ) LatestDate
    String LatestDate = null;
    //:STRING ( 254 ) szAwardValue
    String szAwardValue = null;
    //:STRING ( 254 ) szAwardValueTotal
    String szAwardValueTotal = null;
    //:STRING ( 10000 ) szFootnote
    String szFootnote = null;
    //:STRING ( 254 ) szAwardName
    String szAwardName = null;
    //:STRING ( 14 ) szFallAmount
    String szFallAmount = null;
    //:STRING ( 14 ) szSpringAmount
    String szSpringAmount = null;
    //:STRING ( 14 ) szAmount
    String szAmount = null;
    //:STRING ( 14 ) szFootnoteNumber
    String szFootnoteNumber = null;
    //:STRING ( 14 ) szSomeNumber
    String szSomeNumber = null;
    //:STRING ( 254 ) szCOAString
    String szCOAString = null;
    //:STRING ( 30 ) szCOAName
    String szCOAName = null;
    //:STRING ( 254 ) szCOANumber
    String szCOANumber = null;
    //:STRING ( 254 ) szMsg
    String szMsg = null;
    //:STRING ( 20 )  szAcceptedDeclinedText
    String szAcceptedDeclinedText = null;
    //:STRING ( 1 )   szClearedFlag
    String szClearedFlag = null;
    //:STRING ( 1 )   szProvider
    String szProvider = null;
    //:STRING ( 1 )   szLastProvider
    String szLastProvider = null;
    //:INTEGER nFNNumber
    int nFNNumber = 0;
    //:INTEGER nLen
    int nLen = 0;
    //:DECIMAL dParentStudentLoan
    double dParentStudentLoan = 0.0;
    //:DECIMAL dParentStudentLoanHalf
    double dParentStudentLoanHalf = 0.0;
    //:DECIMAL dGroupTotal
    double dGroupTotal = 0.0;
    //:DECIMAL dSpringTotal
    double dSpringTotal = 0.0;
    //:DECIMAL dFallTotal
    double dFallTotal = 0.0;
    //:DECIMAL dGroupAllTotal
    double dGroupAllTotal = 0.0;
    //:DECIMAL dSpringAllTotal
    double dSpringAllTotal = 0.0;
    //:DECIMAL dFallAllTotal
    double dFallAllTotal = 0.0;
    //:DECIMAL dTotalFinAidAwardAmount
    double dTotalFinAidAwardAmount = 0.0;
    int lTempInteger_0 = 0;
    int lTempInteger_1 = 0;
    int lTempInteger_2 = 0;
    double dTempDecimal_0 = 0.0;
    double dTempDecimal_1 = 0.0;
    String szTempString_0 = null;
    double dTempDecimal_2 = 0.0;
    double dTempDecimal_3 = 0.0;
    double dTempDecimal_4 = 0.0;
    double dTempDecimal_5 = 0.0;
    double dTempDecimal_6 = 0.0;
    double dTempDecimal_7 = 0.0;
    String szTempString_1 = null;
    String szTempString_2 = null;
    double dTempDecimal_8 = 0.0;
    double dTempDecimal_9 = 0.0;
    double dTempDecimal_10 = 0.0;
    double dTempDecimal_11 = 0.0;
    double dTempDecimal_12 = 0.0;
    double dTempDecimal_13 = 0.0;
    int lTempInteger_3 = 0;
    int lTempInteger_4 = 0;
    String szTempString_3 = null;
    String szTempString_4 = null;
    String szTempString_5 = null;
    String szTempString_6 = null;
    String szTempString_7 = null;
    String szTempString_8 = null;
    double dTempDecimal_14 = 0.0;
    int lTempInteger_5 = 0;
    String szTempString_9 = null;

    RESULT = GetViewByName(wXferO, "wXferO", mFAProf, zLEVEL_TASK);

    //:IF  mFAProf.AwardList EXISTS
    lTempInteger_0 = CheckExistenceOfEntity(mFAProf, "AwardList");
    if (lTempInteger_0 == 0) {
        //:DELETE ENTITY  mFAProf.AwardList NONE  
        RESULT = DeleteEntity(mFAProf, "AwardList", zREPOS_NONE);
    }

    //:END

    //:IF  mFAProf.AwardDisbursement EXISTS
    lTempInteger_1 = CheckExistenceOfEntity(mFAProf, "AwardDisbursement");
    if (lTempInteger_1 == 0) {
        //:DELETE ENTITY  mFAProf.AwardDisbursement NONE  
        RESULT = DeleteEntity(mFAProf, "AwardDisbursement", zREPOS_NONE);
    }

    //:END

    //:// Generate a list of Requirements that have been met and that are yet to be accomplished.
    //:GET VIEW mAdmDiv NAMED "mAdmDiv"
    RESULT = GetViewByName(mAdmDiv, "mAdmDiv", mFAProf, zLEVEL_TASK);
    //:IF RESULT >= 0
    if (RESULT >= 0) {

        //:nFNNumber = 0
        nFNNumber = 0;
        //:szFootnote = ""
        {
            StringBuilder sb_szFootnote;
            if (szFootnote == null)
                sb_szFootnote = new StringBuilder(32);
            else
                sb_szFootnote = new StringBuilder(szFootnote);
            ZeidonStringCopy(sb_szFootnote, 1, 0, "", 1, 0, 10001);
            szFootnote = sb_szFootnote.toString();
        }

        //://CREATE ENTITY mFAProf.AwardLetters 
        //:OrderEntityForView( mFAProf, "FinAidAward", "FinAidSource.Provider A" )
        OrderEntityForView(mFAProf, "FinAidAward", "FinAidSource.Provider A");
        //:szLastProvider = ""
        {
            StringBuilder sb_szLastProvider;
            if (szLastProvider == null)
                sb_szLastProvider = new StringBuilder(32);
            else
                sb_szLastProvider = new StringBuilder(szLastProvider);
            ZeidonStringCopy(sb_szLastProvider, 1, 0, "", 1, 0, 2);
            szLastProvider = sb_szLastProvider.toString();
        }
        //: 
        //:// Generate Awards as either awarded or declined.
        //:FOR EACH mFAProf.FinAidAward 
        RESULT = mFAProf.cursor("FinAidAward").setFirst().toInt();
        while (RESULT > zCURSOR_UNCHANGED) {

            //:// If the award is declined, create a FinAidDeclined entity instead.
            //://IF mFAProf.FinAidAward.AwardStatus = "N"
            //://
            //://   // KJS 04/29/09 - Do we care about this?????  I'm taking this code out for now.
            //://   // The Award IS declined.
            //://   CREATE ENTITY mFAProf.FinAidDeclined  
            //://   mFAProf.FinAidDeclined.AwardName = mFAProf.FinAidSource.Name
            //://   mFAProf.FinAidDeclined.Amount    = mFAProf.FinAidAward.Amount
            //://   
            //://ELSE
            //:// KJS 04/29/09 - I have deleted FinAidAwards where the awardstatus is not "Y" or "A" in wStudntD as well.  But
            //:// I don't want to take this "IF" out yet in case this would get called from somewhere else.
            //:IF mFAProf.FinAidAward.AwardStatus = "Y" OR  mFAProf.FinAidAward.AwardStatus = "A"
            if (CompareAttributeToString(mFAProf, "FinAidAward", "AwardStatus", "Y") == 0
                    || CompareAttributeToString(mFAProf, "FinAidAward", "AwardStatus", "A") == 0) {

                //:// The Award is NOT declined.

                //:szAwardValue = ""
                {
                    StringBuilder sb_szAwardValue;
                    if (szAwardValue == null)
                        sb_szAwardValue = new StringBuilder(32);
                    else
                        sb_szAwardValue = new StringBuilder(szAwardValue);
                    ZeidonStringCopy(sb_szAwardValue, 1, 0, "", 1, 0, 255);
                    szAwardValue = sb_szAwardValue.toString();
                }
                //:szFallAmount = ""
                {
                    StringBuilder sb_szFallAmount;
                    if (szFallAmount == null)
                        sb_szFallAmount = new StringBuilder(32);
                    else
                        sb_szFallAmount = new StringBuilder(szFallAmount);
                    ZeidonStringCopy(sb_szFallAmount, 1, 0, "", 1, 0, 15);
                    szFallAmount = sb_szFallAmount.toString();
                }
                //:szSpringAmount = ""
                {
                    StringBuilder sb_szSpringAmount;
                    if (szSpringAmount == null)
                        sb_szSpringAmount = new StringBuilder(32);
                    else
                        sb_szSpringAmount = new StringBuilder(szSpringAmount);
                    ZeidonStringCopy(sb_szSpringAmount, 1, 0, "", 1, 0, 15);
                    szSpringAmount = sb_szSpringAmount.toString();
                }

                //:CREATE ENTITY mFAProf.FinAidAwarded 
                RESULT = CreateEntity(mFAProf, "FinAidAwarded", zPOS_AFTER);
                //:szAwardName = mFAProf.FinAidSource.Name
                {
                    MutableInt mi_lTempInteger_2 = new MutableInt(lTempInteger_2);
                    StringBuilder sb_szAwardName;
                    if (szAwardName == null)
                        sb_szAwardName = new StringBuilder(32);
                    else
                        sb_szAwardName = new StringBuilder(szAwardName);
                    GetVariableFromAttribute(sb_szAwardName, mi_lTempInteger_2, 'S', 255, mFAProf,
                            "FinAidSource", "Name", "", 0);
                    lTempInteger_2 = mi_lTempInteger_2.intValue();
                    szAwardName = sb_szAwardName.toString();
                }
                //:mFAProf.FinAidAwarded.AwardName = szAwardName 
                SetAttributeFromString(mFAProf, "FinAidAwarded", "AwardName", szAwardName);

                //:// Compute Award Amount to take into account that some parts of the Award may be swapped, but we
                //:// want those swapped entries added back into the total, since we're not showing swapped entries in
                //:// this award structure.
                //:// Changed from using OriginalAmountOffered on 8/3/2010 by DonC
                //:dTotalFinAidAwardAmount = 0
                dTotalFinAidAwardAmount = 0;
                //:FOR EACH mFAProf.FinAidAwardDisbursement 
                RESULT = mFAProf.cursor("FinAidAwardDisbursement").setFirst().toInt();
                while (RESULT > zCURSOR_UNCHANGED) {
                    //:dTotalFinAidAwardAmount = dTotalFinAidAwardAmount + mFAProf.FinAidAwardDisbursement.AmountExpected 
                    {
                        MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                        GetDecimalFromAttribute(md_dTempDecimal_0, mFAProf, "FinAidAwardDisbursement",
                                "AmountExpected");
                        dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
                    }
                    dTotalFinAidAwardAmount = dTotalFinAidAwardAmount + dTempDecimal_0;
                    //:FOR EACH mFAProf.SwappedToDisbursement 
                    RESULT = mFAProf.cursor("SwappedToDisbursement").setFirst().toInt();
                    while (RESULT > zCURSOR_UNCHANGED) {
                        //:dTotalFinAidAwardAmount = dTotalFinAidAwardAmount + mFAProf.SwappedToDisbursement.AmountExpected
                        {
                            MutableDouble md_dTempDecimal_1 = new MutableDouble(dTempDecimal_1);
                            GetDecimalFromAttribute(md_dTempDecimal_1, mFAProf, "SwappedToDisbursement",
                                    "AmountExpected");
                            dTempDecimal_1 = md_dTempDecimal_1.doubleValue();
                        }
                        dTotalFinAidAwardAmount = dTotalFinAidAwardAmount + dTempDecimal_1;
                        RESULT = mFAProf.cursor("SwappedToDisbursement").setNextContinue().toInt();
                        ;
                    }

                    RESULT = mFAProf.cursor("FinAidAwardDisbursement").setNextContinue().toInt();
                    ;
                    //:END
                }

                //:END
                //:mFAProf.FinAidAwarded.Amount = dTotalFinAidAwardAmount
                SetAttributeFromDecimal(mFAProf, "FinAidAwarded", "Amount", dTotalFinAidAwardAmount);

                //://mFAProf.FinAidAwarded.Amount = mFAProf.FinAidAward.OriginalAmountOffered  
                //:GetStringFromAttributeByContext( szAmount, mFAProf, "FinAidAwarded", "Amount", "Revenue",10)
                {
                    StringBuilder sb_szAmount;
                    if (szAmount == null)
                        sb_szAmount = new StringBuilder(32);
                    else
                        sb_szAmount = new StringBuilder(szAmount);
                    GetStringFromAttributeByContext(sb_szAmount, mFAProf, "FinAidAwarded", "Amount", "Revenue",
                            10);
                    szAmount = sb_szAmount.toString();
                }
                //://GetStringFromAttributeByContext( szSomeNumber, mFAProf, "FinAidAwarded", "Amount", "Revenue",10)
                //://nLen = zstrlen( szSomeNumber ) //szAmount
                //://ConvertToString10( szSomeNumber, szAmount )

                //:// Compute totals for each Period and then set Fall and Spring values from those totals.
                //:FOR EACH mFAProf.FinAidAwardDisbursement
                RESULT = mFAProf.cursor("FinAidAwardDisbursement").setFirst().toInt();
                while (RESULT > zCURSOR_UNCHANGED) {
                    //:SET CURSOR FIRST mFAProf.PeriodTotals 
                    //:           WHERE mFAProf.PeriodTotals.PeriodDesignator = mFAProf.FinAidAwardPeriod.PeriodDesignator  
                    {
                        StringBuilder sb_szTempString_0;
                        if (szTempString_0 == null)
                            sb_szTempString_0 = new StringBuilder(32);
                        else
                            sb_szTempString_0 = new StringBuilder(szTempString_0);
                        GetStringFromAttribute(sb_szTempString_0, mFAProf, "FinAidAwardPeriod",
                                "PeriodDesignator");
                        szTempString_0 = sb_szTempString_0.toString();
                    }
                    RESULT = mFAProf.cursor("PeriodTotals").setFirst("PeriodDesignator", szTempString_0)
                            .toInt();
                    //:IF RESULT < zCURSOR_SET
                    if (RESULT < zCURSOR_SET) {
                        //:CREATE ENTITY mFAProf.PeriodTotals 
                        RESULT = CreateEntity(mFAProf, "PeriodTotals", zPOS_AFTER);
                        //:mFAProf.PeriodTotals.PeriodDesignator = mFAProf.FinAidAwardPeriod.PeriodDesignator   
                        SetAttributeFromAttribute(mFAProf, "PeriodTotals", "PeriodDesignator", mFAProf,
                                "FinAidAwardPeriod", "PeriodDesignator");
                    }

                    //:END
                    //://mFAProf.PeriodTotals.TotalAmountExp = mFAProf.PeriodTotals.TotalAmountExp + 
                    //://                                      mFAProf.FinAidAwardDisbursement.OriginalAmountExpected  
                    //:mFAProf.PeriodTotals.TotalAmountExp = mFAProf.PeriodTotals.TotalAmountExp + 
                    //:                                      mFAProf.FinAidAwardDisbursement.dTotalAmountExpected  
                    {
                        MutableDouble md_dTempDecimal_2 = new MutableDouble(dTempDecimal_2);
                        GetDecimalFromAttribute(md_dTempDecimal_2, mFAProf, "PeriodTotals", "TotalAmountExp");
                        dTempDecimal_2 = md_dTempDecimal_2.doubleValue();
                    }
                    {
                        MutableDouble md_dTempDecimal_3 = new MutableDouble(dTempDecimal_3);
                        GetDecimalFromAttribute(md_dTempDecimal_3, mFAProf, "FinAidAwardDisbursement",
                                "dTotalAmountExpected");
                        dTempDecimal_3 = md_dTempDecimal_3.doubleValue();
                    }
                    dTempDecimal_4 = dTempDecimal_2 + dTempDecimal_3;
                    SetAttributeFromDecimal(mFAProf, "PeriodTotals", "TotalAmountExp", dTempDecimal_4);
                    //://mFAProf.PeriodTotals.TotalAmount = mFAProf.PeriodTotals.TotalAmount + 
                    //://                                   mFAProf.FinAidAwardDisbursement.Amount 
                    //:mFAProf.PeriodTotals.TotalAmount = mFAProf.PeriodTotals.TotalAmount + 
                    //:                                   mFAProf.FinAidAwardDisbursement.dTotalDisbursment 
                    {
                        MutableDouble md_dTempDecimal_5 = new MutableDouble(dTempDecimal_5);
                        GetDecimalFromAttribute(md_dTempDecimal_5, mFAProf, "PeriodTotals", "TotalAmount");
                        dTempDecimal_5 = md_dTempDecimal_5.doubleValue();
                    }
                    {
                        MutableDouble md_dTempDecimal_6 = new MutableDouble(dTempDecimal_6);
                        GetDecimalFromAttribute(md_dTempDecimal_6, mFAProf, "FinAidAwardDisbursement",
                                "dTotalDisbursment");
                        dTempDecimal_6 = md_dTempDecimal_6.doubleValue();
                    }
                    dTempDecimal_7 = dTempDecimal_5 + dTempDecimal_6;
                    SetAttributeFromDecimal(mFAProf, "PeriodTotals", "TotalAmount", dTempDecimal_7);
                    RESULT = mFAProf.cursor("FinAidAwardDisbursement").setNextContinue().toInt();
                    ;
                }

                //:END
                //:OrderEntityForView( mFAProf, "PeriodTotals", "PeriodDesignator A" )
                OrderEntityForView(mFAProf, "PeriodTotals", "PeriodDesignator A");
                //:SET CURSOR FIRST mFAProf.PeriodTotals
                RESULT = mFAProf.cursor("PeriodTotals").setFirst().toInt();
                //:IF RESULT >= zCURSOR_SET
                if (RESULT >= zCURSOR_SET) {
                    //:mFAProf.FinAidAwarded.FallAmountExp = mFAProf.PeriodTotals.TotalAmountExp
                    SetAttributeFromAttribute(mFAProf, "FinAidAwarded", "FallAmountExp", mFAProf,
                            "PeriodTotals", "TotalAmountExp");
                    //:mFAProf.FinAidAwarded.FallAmount = mFAProf.PeriodTotals.TotalAmount
                    SetAttributeFromAttribute(mFAProf, "FinAidAwarded", "FallAmount", mFAProf, "PeriodTotals",
                            "TotalAmount");
                    //:GetStringFromAttributeByContext( szFallAmount, mFAProf, "FinAidAwarded", "FallAmountExp", "Revenue",10)
                    {
                        StringBuilder sb_szFallAmount;
                        if (szFallAmount == null)
                            sb_szFallAmount = new StringBuilder(32);
                        else
                            sb_szFallAmount = new StringBuilder(szFallAmount);
                        GetStringFromAttributeByContext(sb_szFallAmount, mFAProf, "FinAidAwarded",
                                "FallAmountExp", "Revenue", 10);
                        szFallAmount = sb_szFallAmount.toString();
                    }
                    //://GetStringFromAttributeByContext( szSomeNumber, mFAProf, "FinAidAwarded", "FallAmount", "Revenue",10)
                    //://nLen = zstrlen( szSomeNumber ) //szFallAmount
                    //://ConvertToString10( szSomeNumber, szFallAmount )
                    //:SET CURSOR NEXT mFAProf.PeriodTotals 
                    RESULT = mFAProf.cursor("PeriodTotals").setNextContinue().toInt();
                    ;
                    //:IF RESULT >= zCURSOR_SET 
                    if (RESULT >= zCURSOR_SET) {
                        //:mFAProf.FinAidAwarded.SpringAmountExp = mFAProf.PeriodTotals.TotalAmountExp
                        SetAttributeFromAttribute(mFAProf, "FinAidAwarded", "SpringAmountExp", mFAProf,
                                "PeriodTotals", "TotalAmountExp");
                        //:mFAProf.FinAidAwarded.SpringAmount = mFAProf.PeriodTotals.TotalAmount
                        SetAttributeFromAttribute(mFAProf, "FinAidAwarded", "SpringAmount", mFAProf,
                                "PeriodTotals", "TotalAmount");
                        //:GetStringFromAttributeByContext( szSpringAmount, mFAProf, "FinAidAwarded", "SpringAmountExp", "Revenue",10)
                        {
                            StringBuilder sb_szSpringAmount;
                            if (szSpringAmount == null)
                                sb_szSpringAmount = new StringBuilder(32);
                            else
                                sb_szSpringAmount = new StringBuilder(szSpringAmount);
                            GetStringFromAttributeByContext(sb_szSpringAmount, mFAProf, "FinAidAwarded",
                                    "SpringAmountExp", "Revenue", 10);
                            szSpringAmount = sb_szSpringAmount.toString();
                        }
                    }

                    //:   //GetStringFromAttributeByContext( szSomeNumber, mFAProf, "FinAidAwarded", "SpringAmount", "Revenue",10)
                    //:   //nLen = zstrlen( szSomeNumber ) //szSpringAmount
                    //:   //ConvertToString10( szSomeNumber, szSpringAmount )
                    //:END
                }

                //:END
                //:  
                //:/*    
                //:szFootnote = mFAProf.FinAidSource.SourceFootnote
                //:IF mFAProf.ReceivedItems EXISTS AND mAdmDiv.FA_FinAidRequirement EXISTS
                //:   mFAProf.ReceivedItems.Description = mAdmDiv.FA_FinAidRequirement.Name
                //:END
                //:IF szFootnote != ""
                //:   nFNNumber = nFNNumber + 1
                //:   zIntegerToString( szFootnoteNumber, 10, nFNNumber )
                //:   szAwardName = szAwardName + "* " + szFootnoteNumber
                //:   mFAProf.FinAidAwarded.AwardName = szAwardName 
                //:   CREATE ENTITY mFAProf.Footnote
                //:   mFAProf.Footnote.SourceFootnote = szFootnoteNumber + ": " + szFootnote
                //:   mFAProf.Footnote.AwardName = mFAProf.FinAidAwarded.AwardName  
                //:   szFootnote = ""
                //:END
                //:*/

                //:// Build Award Groups by Federal Aid, Institutional Aid and Other Aid.
                //:IF mFAProf.FinAidAward.AwardStatus = "Y" 
                if (CompareAttributeToString(mFAProf, "FinAidAward", "AwardStatus", "Y") == 0) {
                    //:szAcceptedDeclinedText = "Accepted"
                    {
                        StringBuilder sb_szAcceptedDeclinedText;
                        if (szAcceptedDeclinedText == null)
                            sb_szAcceptedDeclinedText = new StringBuilder(32);
                        else
                            sb_szAcceptedDeclinedText = new StringBuilder(szAcceptedDeclinedText);
                        ZeidonStringCopy(sb_szAcceptedDeclinedText, 1, 0, "Accepted", 1, 0, 21);
                        szAcceptedDeclinedText = sb_szAcceptedDeclinedText.toString();
                    }
                    //:ELSE
                } else {
                    //:IF mFAProf.FinAidAward.AwardStatus = "N" 
                    if (CompareAttributeToString(mFAProf, "FinAidAward", "AwardStatus", "N") == 0) {
                        //:szAcceptedDeclinedText = "         Declined"
                        {
                            StringBuilder sb_szAcceptedDeclinedText;
                            if (szAcceptedDeclinedText == null)
                                sb_szAcceptedDeclinedText = new StringBuilder(32);
                            else
                                sb_szAcceptedDeclinedText = new StringBuilder(szAcceptedDeclinedText);
                            ZeidonStringCopy(sb_szAcceptedDeclinedText, 1, 0, "         Declined", 1, 0, 21);
                            szAcceptedDeclinedText = sb_szAcceptedDeclinedText.toString();
                        }
                        //:ELSE
                    } else {
                        //:szAcceptedDeclinedText = "_______  _______"
                        {
                            StringBuilder sb_szAcceptedDeclinedText;
                            if (szAcceptedDeclinedText == null)
                                sb_szAcceptedDeclinedText = new StringBuilder(32);
                            else
                                sb_szAcceptedDeclinedText = new StringBuilder(szAcceptedDeclinedText);
                            ZeidonStringCopy(sb_szAcceptedDeclinedText, 1, 0, "_______  _______", 1, 0, 21);
                            szAcceptedDeclinedText = sb_szAcceptedDeclinedText.toString();
                        }
                    }

                    //:END
                }

                //:END

                //:IF  szLastProvider != mFAProf.FinAidSource.Provider 
                if (CompareAttributeToString(mFAProf, "FinAidSource", "Provider", szLastProvider) != 0) {

                    //:CREATE ENTITY mFAProf.AwardList LAST
                    RESULT = CreateEntity(mFAProf, "AwardList", zPOS_LAST);
                    //:mFAProf.AwardList.Provider = mFAProf.FinAidSource.Provider
                    SetAttributeFromAttribute(mFAProf, "AwardList", "Provider", mFAProf, "FinAidSource",
                            "Provider");

                    //:IF mFAProf.FinAidSource.Provider = "G"
                    if (CompareAttributeToString(mFAProf, "FinAidSource", "Provider", "G") == 0) {
                        //:mFAProf.AwardList.GroupName = "Federal Aid"
                        SetAttributeFromString(mFAProf, "AwardList", "GroupName", "Federal Aid");
                    }

                    //:END 
                    //:IF mFAProf.FinAidSource.Provider = "I"
                    if (CompareAttributeToString(mFAProf, "FinAidSource", "Provider", "I") == 0) {
                        //:mFAProf.AwardList.GroupName = "Institutional Aid"
                        SetAttributeFromString(mFAProf, "AwardList", "GroupName", "Institutional Aid");
                    }

                    //:END 
                    //:IF mFAProf.FinAidSource.Provider = "O"
                    if (CompareAttributeToString(mFAProf, "FinAidSource", "Provider", "O") == 0) {
                        //:mFAProf.AwardList.GroupName = "Other Aid"
                        SetAttributeFromString(mFAProf, "AwardList", "GroupName", "Other Aid");
                    }

                    //:END 

                    //:IF  szLastProvider != ""
                    if (ZeidonStringCompare(szLastProvider, 1, 0, "", 1, 0, 2) != 0) {

                        //:SET CURSOR  FIRST mFAProf.AwardList WHERE mFAProf.AwardList.Provider = szLastProvider
                        RESULT = mFAProf.cursor("AwardList").setFirst("Provider", szLastProvider).toInt();
                        //:mFAProf.AwardList.Amount = dGroupTotal
                        SetAttributeFromDecimal(mFAProf, "AwardList", "Amount", dGroupTotal);
                        //:mFAProf.AwardList.SpringAmount = dSpringTotal
                        SetAttributeFromDecimal(mFAProf, "AwardList", "SpringAmount", dSpringTotal);
                        //:mFAProf.AwardList.FallAmount = dFallTotal
                        SetAttributeFromDecimal(mFAProf, "AwardList", "FallAmount", dFallTotal);

                        //:GetStringFromAttributeByContext( szString, mFAProf, "AwardList", "Amount", "Revenue", 30 )  
                        {
                            StringBuilder sb_szString;
                            if (szString == null)
                                sb_szString = new StringBuilder(32);
                            else
                                sb_szString = new StringBuilder(szString);
                            GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardList", "Amount",
                                    "Revenue", 30);
                            szString = sb_szString.toString();
                        }
                        //:mFAProf.AwardList.AmountTxt = "<b>" + szString + "</b>"
                        {
                            StringBuilder sb_szTempString_0;
                            if (szTempString_0 == null)
                                sb_szTempString_0 = new StringBuilder(32);
                            else
                                sb_szTempString_0 = new StringBuilder(szTempString_0);
                            ZeidonStringCopy(sb_szTempString_0, 1, 0, "<b>", 1, 0, 255);
                            szTempString_0 = sb_szTempString_0.toString();
                        }
                        {
                            StringBuilder sb_szTempString_0;
                            if (szTempString_0 == null)
                                sb_szTempString_0 = new StringBuilder(32);
                            else
                                sb_szTempString_0 = new StringBuilder(szTempString_0);
                            ZeidonStringConcat(sb_szTempString_0, 1, 0, szString, 1, 0, 255);
                            szTempString_0 = sb_szTempString_0.toString();
                        }
                        {
                            StringBuilder sb_szTempString_0;
                            if (szTempString_0 == null)
                                sb_szTempString_0 = new StringBuilder(32);
                            else
                                sb_szTempString_0 = new StringBuilder(szTempString_0);
                            ZeidonStringConcat(sb_szTempString_0, 1, 0, "</b>", 1, 0, 255);
                            szTempString_0 = sb_szTempString_0.toString();
                        }
                        SetAttributeFromString(mFAProf, "AwardList", "AmountTxt", szTempString_0);
                        //:GetStringFromAttributeByContext( szString, mFAProf, "AwardList", "FallAmount", "Revenue", 30 ) 
                        {
                            StringBuilder sb_szString;
                            if (szString == null)
                                sb_szString = new StringBuilder(32);
                            else
                                sb_szString = new StringBuilder(szString);
                            GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardList", "FallAmount",
                                    "Revenue", 30);
                            szString = sb_szString.toString();
                        }
                        //:mFAProf.AwardList.FallTxt = "<b>" + szString + "</b>"
                        {
                            StringBuilder sb_szTempString_1;
                            if (szTempString_1 == null)
                                sb_szTempString_1 = new StringBuilder(32);
                            else
                                sb_szTempString_1 = new StringBuilder(szTempString_1);
                            ZeidonStringCopy(sb_szTempString_1, 1, 0, "<b>", 1, 0, 255);
                            szTempString_1 = sb_szTempString_1.toString();
                        }
                        {
                            StringBuilder sb_szTempString_1;
                            if (szTempString_1 == null)
                                sb_szTempString_1 = new StringBuilder(32);
                            else
                                sb_szTempString_1 = new StringBuilder(szTempString_1);
                            ZeidonStringConcat(sb_szTempString_1, 1, 0, szString, 1, 0, 255);
                            szTempString_1 = sb_szTempString_1.toString();
                        }
                        {
                            StringBuilder sb_szTempString_1;
                            if (szTempString_1 == null)
                                sb_szTempString_1 = new StringBuilder(32);
                            else
                                sb_szTempString_1 = new StringBuilder(szTempString_1);
                            ZeidonStringConcat(sb_szTempString_1, 1, 0, "</b>", 1, 0, 255);
                            szTempString_1 = sb_szTempString_1.toString();
                        }
                        SetAttributeFromString(mFAProf, "AwardList", "FallTxt", szTempString_1);
                        //:GetStringFromAttributeByContext( szString, mFAProf, "AwardList", "SpringAmount", "Revenue", 30 ) 
                        {
                            StringBuilder sb_szString;
                            if (szString == null)
                                sb_szString = new StringBuilder(32);
                            else
                                sb_szString = new StringBuilder(szString);
                            GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardList", "SpringAmount",
                                    "Revenue", 30);
                            szString = sb_szString.toString();
                        }
                        //:mFAProf.AwardList.SpringTxt = "<b>" + szString + "</b>"
                        {
                            StringBuilder sb_szTempString_2;
                            if (szTempString_2 == null)
                                sb_szTempString_2 = new StringBuilder(32);
                            else
                                sb_szTempString_2 = new StringBuilder(szTempString_2);
                            ZeidonStringCopy(sb_szTempString_2, 1, 0, "<b>", 1, 0, 255);
                            szTempString_2 = sb_szTempString_2.toString();
                        }
                        {
                            StringBuilder sb_szTempString_2;
                            if (szTempString_2 == null)
                                sb_szTempString_2 = new StringBuilder(32);
                            else
                                sb_szTempString_2 = new StringBuilder(szTempString_2);
                            ZeidonStringConcat(sb_szTempString_2, 1, 0, szString, 1, 0, 255);
                            szTempString_2 = sb_szTempString_2.toString();
                        }
                        {
                            StringBuilder sb_szTempString_2;
                            if (szTempString_2 == null)
                                sb_szTempString_2 = new StringBuilder(32);
                            else
                                sb_szTempString_2 = new StringBuilder(szTempString_2);
                            ZeidonStringConcat(sb_szTempString_2, 1, 0, "</b>", 1, 0, 255);
                            szTempString_2 = sb_szTempString_2.toString();
                        }
                        SetAttributeFromString(mFAProf, "AwardList", "SpringTxt", szTempString_2);
                        //:      
                        //:dGroupTotal = 0
                        dGroupTotal = 0;
                        //:dSpringTotal = 0
                        dSpringTotal = 0;
                        //:dFallTotal = 0
                        dFallTotal = 0;
                    }

                    //:END
                }

                //:END

                //:CREATE ENTITY  mFAProf.AwardList LAST
                RESULT = CreateEntity(mFAProf, "AwardList", zPOS_LAST);
                //:mFAProf.AwardList.AwardName = mFAProf.FinAidSource.Name  
                SetAttributeFromAttribute(mFAProf, "AwardList", "AwardName", mFAProf, "FinAidSource", "Name");
                //:mFAProf.AwardList.Amount   = dTotalFinAidAwardAmount      // Computed above.
                SetAttributeFromDecimal(mFAProf, "AwardList", "Amount", dTotalFinAidAwardAmount);
                //:mFAProf.AwardList.SpringAmount  = mFAProf.FinAidAwarded.SpringAmountExp 
                SetAttributeFromAttribute(mFAProf, "AwardList", "SpringAmount", mFAProf, "FinAidAwarded",
                        "SpringAmountExp");
                //:mFAProf.AwardList.FallAmount    = mFAProf.FinAidAwarded.FallAmountExp 
                SetAttributeFromAttribute(mFAProf, "AwardList", "FallAmount", mFAProf, "FinAidAwarded",
                        "FallAmountExp");
                //:mFAProf.AwardList.AwardStatus = mFAProf.FinAidAward.AwardStatus 
                SetAttributeFromAttribute(mFAProf, "AwardList", "AwardStatus", mFAProf, "FinAidAward",
                        "AwardStatus");
                //:mFAProf.AwardList.AcceptedDeclinedText = szAcceptedDeclinedText
                SetAttributeFromString(mFAProf, "AwardList", "AcceptedDeclinedText", szAcceptedDeclinedText);

                //:GetStringFromAttributeByContext( szString, mFAProf, "AwardList", "Amount", "Revenue", 30 )  
                {
                    StringBuilder sb_szString;
                    if (szString == null)
                        sb_szString = new StringBuilder(32);
                    else
                        sb_szString = new StringBuilder(szString);
                    GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardList", "Amount", "Revenue", 30);
                    szString = sb_szString.toString();
                }
                //:mFAProf.AwardList.AmountTxt = szString
                SetAttributeFromString(mFAProf, "AwardList", "AmountTxt", szString);
                //:GetStringFromAttributeByContext( szString, mFAProf, "AwardList", "FallAmount", "Revenue", 30 )
                {
                    StringBuilder sb_szString;
                    if (szString == null)
                        sb_szString = new StringBuilder(32);
                    else
                        sb_szString = new StringBuilder(szString);
                    GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardList", "FallAmount", "Revenue",
                            30);
                    szString = sb_szString.toString();
                }
                //:mFAProf.AwardList.FallTxt = szString
                SetAttributeFromString(mFAProf, "AwardList", "FallTxt", szString);
                //:GetStringFromAttributeByContext( szString, mFAProf, "AwardList", "SpringAmount", "Revenue", 30 )
                {
                    StringBuilder sb_szString;
                    if (szString == null)
                        sb_szString = new StringBuilder(32);
                    else
                        sb_szString = new StringBuilder(szString);
                    GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardList", "SpringAmount",
                            "Revenue", 30);
                    szString = sb_szString.toString();
                }
                //:mFAProf.AwardList.SpringTxt = szString
                SetAttributeFromString(mFAProf, "AwardList", "SpringTxt", szString);

                //:// Create display entities to show the dispersment showing both fall and spring numbers together
                //:// on the same row.
                //:CREATE ENTITY  mFAProf.AwardDisbursement LAST
                RESULT = CreateEntity(mFAProf, "AwardDisbursement", zPOS_LAST);
                //:mFAProf.AwardDisbursement.AwardName = mFAProf.FinAidSource.Name  
                SetAttributeFromAttribute(mFAProf, "AwardDisbursement", "AwardName", mFAProf, "FinAidSource",
                        "Name");
                //:mFAProf.AwardDisbursement.SpringAmount  = mFAProf.FinAidAwarded.SpringAmount 
                SetAttributeFromAttribute(mFAProf, "AwardDisbursement", "SpringAmount", mFAProf,
                        "FinAidAwarded", "SpringAmount");
                //:mFAProf.AwardDisbursement.FallAmount    = mFAProf.FinAidAwarded.FallAmount 
                SetAttributeFromAttribute(mFAProf, "AwardDisbursement", "FallAmount", mFAProf, "FinAidAwarded",
                        "FallAmount");
                //:mFAProf.AwardDisbursement.SpringAmountExp  = mFAProf.FinAidAwarded.SpringAmountExp 
                SetAttributeFromAttribute(mFAProf, "AwardDisbursement", "SpringAmountExp", mFAProf,
                        "FinAidAwarded", "SpringAmountExp");
                //:mFAProf.AwardDisbursement.FallAmountExp    = mFAProf.FinAidAwarded.FallAmountExp 
                SetAttributeFromAttribute(mFAProf, "AwardDisbursement", "FallAmountExp", mFAProf,
                        "FinAidAwarded", "FallAmountExp");
                //:mFAProf.AwardDisbursement.AwardStatus = mFAProf.FinAidAward.AwardStatus 
                SetAttributeFromAttribute(mFAProf, "AwardDisbursement", "AwardStatus", mFAProf, "FinAidAward",
                        "AwardStatus");
                //:mFAProf.AwardDisbursement.AcceptedDeclinedText = szAcceptedDeclinedText
                SetAttributeFromString(mFAProf, "AwardDisbursement", "AcceptedDeclinedText",
                        szAcceptedDeclinedText);

                //:GetStringFromAttributeByContext( szString, mFAProf, "AwardDisbursement", "FallAmount", "Revenue", 30 )
                {
                    StringBuilder sb_szString;
                    if (szString == null)
                        sb_szString = new StringBuilder(32);
                    else
                        sb_szString = new StringBuilder(szString);
                    GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardDisbursement", "FallAmount",
                            "Revenue", 30);
                    szString = sb_szString.toString();
                }
                //:mFAProf.AwardDisbursement.FallTxt = szString
                SetAttributeFromString(mFAProf, "AwardDisbursement", "FallTxt", szString);
                //:GetStringFromAttributeByContext( szString, mFAProf, "AwardDisbursement", "SpringAmount", "Revenue", 30 )
                {
                    StringBuilder sb_szString;
                    if (szString == null)
                        sb_szString = new StringBuilder(32);
                    else
                        sb_szString = new StringBuilder(szString);
                    GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardDisbursement", "SpringAmount",
                            "Revenue", 30);
                    szString = sb_szString.toString();
                }
                //:mFAProf.AwardDisbursement.SpringTxt = szString
                SetAttributeFromString(mFAProf, "AwardDisbursement", "SpringTxt", szString);

                //:dGroupTotal   = dGroupTotal + mFAProf.FinAidAwarded.Amount 
                {
                    MutableDouble md_dTempDecimal_8 = new MutableDouble(dTempDecimal_8);
                    GetDecimalFromAttribute(md_dTempDecimal_8, mFAProf, "FinAidAwarded", "Amount");
                    dTempDecimal_8 = md_dTempDecimal_8.doubleValue();
                }
                dGroupTotal = dGroupTotal + dTempDecimal_8;
                //:dSpringTotal  = dSpringTotal + mFAProf.FinAidAwarded.SpringAmountExp 
                {
                    MutableDouble md_dTempDecimal_9 = new MutableDouble(dTempDecimal_9);
                    GetDecimalFromAttribute(md_dTempDecimal_9, mFAProf, "FinAidAwarded", "SpringAmountExp");
                    dTempDecimal_9 = md_dTempDecimal_9.doubleValue();
                }
                dSpringTotal = dSpringTotal + dTempDecimal_9;
                //:dFallTotal    = dFallTotal + mFAProf.FinAidAwarded.FallAmountExp 
                {
                    MutableDouble md_dTempDecimal_10 = new MutableDouble(dTempDecimal_10);
                    GetDecimalFromAttribute(md_dTempDecimal_10, mFAProf, "FinAidAwarded", "FallAmountExp");
                    dTempDecimal_10 = md_dTempDecimal_10.doubleValue();
                }
                dFallTotal = dFallTotal + dTempDecimal_10;

                //:dGroupAllTotal   = dGroupAllTotal + mFAProf.FinAidAwarded.Amount 
                {
                    MutableDouble md_dTempDecimal_11 = new MutableDouble(dTempDecimal_11);
                    GetDecimalFromAttribute(md_dTempDecimal_11, mFAProf, "FinAidAwarded", "Amount");
                    dTempDecimal_11 = md_dTempDecimal_11.doubleValue();
                }
                dGroupAllTotal = dGroupAllTotal + dTempDecimal_11;
                //:dSpringAllTotal  = dSpringAllTotal + mFAProf.FinAidAwarded.SpringAmountExp 
                {
                    MutableDouble md_dTempDecimal_12 = new MutableDouble(dTempDecimal_12);
                    GetDecimalFromAttribute(md_dTempDecimal_12, mFAProf, "FinAidAwarded", "SpringAmountExp");
                    dTempDecimal_12 = md_dTempDecimal_12.doubleValue();
                }
                dSpringAllTotal = dSpringAllTotal + dTempDecimal_12;
                //:dFallAllTotal    = dFallAllTotal + mFAProf.FinAidAwarded.FallAmountExp 
                {
                    MutableDouble md_dTempDecimal_13 = new MutableDouble(dTempDecimal_13);
                    GetDecimalFromAttribute(md_dTempDecimal_13, mFAProf, "FinAidAwarded", "FallAmountExp");
                    dTempDecimal_13 = md_dTempDecimal_13.doubleValue();
                }
                dFallAllTotal = dFallAllTotal + dTempDecimal_13;

                //:szLastProvider = mFAProf.FinAidSource.Provider
                {
                    MutableInt mi_lTempInteger_3 = new MutableInt(lTempInteger_3);
                    StringBuilder sb_szLastProvider;
                    if (szLastProvider == null)
                        sb_szLastProvider = new StringBuilder(32);
                    else
                        sb_szLastProvider = new StringBuilder(szLastProvider);
                    GetVariableFromAttribute(sb_szLastProvider, mi_lTempInteger_3, 'S', 2, mFAProf,
                            "FinAidSource", "Provider", "", 0);
                    lTempInteger_3 = mi_lTempInteger_3.intValue();
                    szLastProvider = sb_szLastProvider.toString();
                }
            }

            RESULT = mFAProf.cursor("FinAidAward").setNextContinue().toInt();
            ;

            //:END  //if award is declined
        }

        //:END

        //:IF mFAProf.AwardList EXISTS 
        lTempInteger_4 = CheckExistenceOfEntity(mFAProf, "AwardList");
        if (lTempInteger_4 == 0) {

            //:SET CURSOR  FIRST mFAProf.AwardList WHERE mFAProf.AwardList.Provider = szLastProvider
            RESULT = mFAProf.cursor("AwardList").setFirst("Provider", szLastProvider).toInt();
            //:mFAProf.AwardList.Amount = dGroupTotal
            SetAttributeFromDecimal(mFAProf, "AwardList", "Amount", dGroupTotal);
            //:mFAProf.AwardList.SpringAmount = dSpringTotal
            SetAttributeFromDecimal(mFAProf, "AwardList", "SpringAmount", dSpringTotal);
            //:mFAProf.AwardList.FallAmount = dFallTotal
            SetAttributeFromDecimal(mFAProf, "AwardList", "FallAmount", dFallTotal);
            //:                 
            //:GetStringFromAttributeByContext( szString, mFAProf, "AwardList", "Amount", "Revenue", 30 )  
            {
                StringBuilder sb_szString;
                if (szString == null)
                    sb_szString = new StringBuilder(32);
                else
                    sb_szString = new StringBuilder(szString);
                GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardList", "Amount", "Revenue", 30);
                szString = sb_szString.toString();
            }
            //:mFAProf.AwardList.AmountTxt = "<b>" + szString + "</b>"
            {
                StringBuilder sb_szTempString_3;
                if (szTempString_3 == null)
                    sb_szTempString_3 = new StringBuilder(32);
                else
                    sb_szTempString_3 = new StringBuilder(szTempString_3);
                ZeidonStringCopy(sb_szTempString_3, 1, 0, "<b>", 1, 0, 255);
                szTempString_3 = sb_szTempString_3.toString();
            }
            {
                StringBuilder sb_szTempString_3;
                if (szTempString_3 == null)
                    sb_szTempString_3 = new StringBuilder(32);
                else
                    sb_szTempString_3 = new StringBuilder(szTempString_3);
                ZeidonStringConcat(sb_szTempString_3, 1, 0, szString, 1, 0, 255);
                szTempString_3 = sb_szTempString_3.toString();
            }
            {
                StringBuilder sb_szTempString_3;
                if (szTempString_3 == null)
                    sb_szTempString_3 = new StringBuilder(32);
                else
                    sb_szTempString_3 = new StringBuilder(szTempString_3);
                ZeidonStringConcat(sb_szTempString_3, 1, 0, "</b>", 1, 0, 255);
                szTempString_3 = sb_szTempString_3.toString();
            }
            SetAttributeFromString(mFAProf, "AwardList", "AmountTxt", szTempString_3);
            //:GetStringFromAttributeByContext( szString, mFAProf, "AwardList", "FallAmount", "Revenue", 30 )
            {
                StringBuilder sb_szString;
                if (szString == null)
                    sb_szString = new StringBuilder(32);
                else
                    sb_szString = new StringBuilder(szString);
                GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardList", "FallAmount", "Revenue", 30);
                szString = sb_szString.toString();
            }
            //:mFAProf.AwardList.FallTxt = "<b>" + szString + "</b>"
            {
                StringBuilder sb_szTempString_4;
                if (szTempString_4 == null)
                    sb_szTempString_4 = new StringBuilder(32);
                else
                    sb_szTempString_4 = new StringBuilder(szTempString_4);
                ZeidonStringCopy(sb_szTempString_4, 1, 0, "<b>", 1, 0, 255);
                szTempString_4 = sb_szTempString_4.toString();
            }
            {
                StringBuilder sb_szTempString_4;
                if (szTempString_4 == null)
                    sb_szTempString_4 = new StringBuilder(32);
                else
                    sb_szTempString_4 = new StringBuilder(szTempString_4);
                ZeidonStringConcat(sb_szTempString_4, 1, 0, szString, 1, 0, 255);
                szTempString_4 = sb_szTempString_4.toString();
            }
            {
                StringBuilder sb_szTempString_4;
                if (szTempString_4 == null)
                    sb_szTempString_4 = new StringBuilder(32);
                else
                    sb_szTempString_4 = new StringBuilder(szTempString_4);
                ZeidonStringConcat(sb_szTempString_4, 1, 0, "</b>", 1, 0, 255);
                szTempString_4 = sb_szTempString_4.toString();
            }
            SetAttributeFromString(mFAProf, "AwardList", "FallTxt", szTempString_4);
            //:GetStringFromAttributeByContext( szString, mFAProf, "AwardList", "SpringAmount", "Revenue", 30 )
            {
                StringBuilder sb_szString;
                if (szString == null)
                    sb_szString = new StringBuilder(32);
                else
                    sb_szString = new StringBuilder(szString);
                GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardList", "SpringAmount", "Revenue",
                        30);
                szString = sb_szString.toString();
            }
            //:mFAProf.AwardList.SpringTxt = "<b>" + szString + "</b>"
            {
                StringBuilder sb_szTempString_5;
                if (szTempString_5 == null)
                    sb_szTempString_5 = new StringBuilder(32);
                else
                    sb_szTempString_5 = new StringBuilder(szTempString_5);
                ZeidonStringCopy(sb_szTempString_5, 1, 0, "<b>", 1, 0, 255);
                szTempString_5 = sb_szTempString_5.toString();
            }
            {
                StringBuilder sb_szTempString_5;
                if (szTempString_5 == null)
                    sb_szTempString_5 = new StringBuilder(32);
                else
                    sb_szTempString_5 = new StringBuilder(szTempString_5);
                ZeidonStringConcat(sb_szTempString_5, 1, 0, szString, 1, 0, 255);
                szTempString_5 = sb_szTempString_5.toString();
            }
            {
                StringBuilder sb_szTempString_5;
                if (szTempString_5 == null)
                    sb_szTempString_5 = new StringBuilder(32);
                else
                    sb_szTempString_5 = new StringBuilder(szTempString_5);
                ZeidonStringConcat(sb_szTempString_5, 1, 0, "</b>", 1, 0, 255);
                szTempString_5 = sb_szTempString_5.toString();
            }
            SetAttributeFromString(mFAProf, "AwardList", "SpringTxt", szTempString_5);

            //:CREATE ENTITY  mFAProf.AwardList FIRST
            RESULT = CreateEntity(mFAProf, "AwardList", zPOS_FIRST);
            //:mFAProf.AwardList.GroupName    = "<b>Total</b>"
            SetAttributeFromString(mFAProf, "AwardList", "GroupName", "<b>Total</b>");
            //:mFAProf.AwardList.Amount       = dGroupAllTotal 
            SetAttributeFromDecimal(mFAProf, "AwardList", "Amount", dGroupAllTotal);
            //:mFAProf.AwardList.SpringAmount = dSpringAllTotal 
            SetAttributeFromDecimal(mFAProf, "AwardList", "SpringAmount", dSpringAllTotal);
            //:mFAProf.AwardList.FallAmount   = dFallAllTotal 
            SetAttributeFromDecimal(mFAProf, "AwardList", "FallAmount", dFallAllTotal);
            //:                 
            //:GetStringFromAttributeByContext( szString, mFAProf, "AwardList", "Amount", "Revenue", 30 )  
            {
                StringBuilder sb_szString;
                if (szString == null)
                    sb_szString = new StringBuilder(32);
                else
                    sb_szString = new StringBuilder(szString);
                GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardList", "Amount", "Revenue", 30);
                szString = sb_szString.toString();
            }
            //:mFAProf.AwardList.AmountTxt = "<b>" + szString + "</b>"
            {
                StringBuilder sb_szTempString_6;
                if (szTempString_6 == null)
                    sb_szTempString_6 = new StringBuilder(32);
                else
                    sb_szTempString_6 = new StringBuilder(szTempString_6);
                ZeidonStringCopy(sb_szTempString_6, 1, 0, "<b>", 1, 0, 255);
                szTempString_6 = sb_szTempString_6.toString();
            }
            {
                StringBuilder sb_szTempString_6;
                if (szTempString_6 == null)
                    sb_szTempString_6 = new StringBuilder(32);
                else
                    sb_szTempString_6 = new StringBuilder(szTempString_6);
                ZeidonStringConcat(sb_szTempString_6, 1, 0, szString, 1, 0, 255);
                szTempString_6 = sb_szTempString_6.toString();
            }
            {
                StringBuilder sb_szTempString_6;
                if (szTempString_6 == null)
                    sb_szTempString_6 = new StringBuilder(32);
                else
                    sb_szTempString_6 = new StringBuilder(szTempString_6);
                ZeidonStringConcat(sb_szTempString_6, 1, 0, "</b>", 1, 0, 255);
                szTempString_6 = sb_szTempString_6.toString();
            }
            SetAttributeFromString(mFAProf, "AwardList", "AmountTxt", szTempString_6);
            //:GetStringFromAttributeByContext( szString, mFAProf, "AwardList", "FallAmount", "Revenue", 30 )
            {
                StringBuilder sb_szString;
                if (szString == null)
                    sb_szString = new StringBuilder(32);
                else
                    sb_szString = new StringBuilder(szString);
                GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardList", "FallAmount", "Revenue", 30);
                szString = sb_szString.toString();
            }
            //:mFAProf.AwardList.FallTxt = "<b>" + szString + "</b>"
            {
                StringBuilder sb_szTempString_7;
                if (szTempString_7 == null)
                    sb_szTempString_7 = new StringBuilder(32);
                else
                    sb_szTempString_7 = new StringBuilder(szTempString_7);
                ZeidonStringCopy(sb_szTempString_7, 1, 0, "<b>", 1, 0, 255);
                szTempString_7 = sb_szTempString_7.toString();
            }
            {
                StringBuilder sb_szTempString_7;
                if (szTempString_7 == null)
                    sb_szTempString_7 = new StringBuilder(32);
                else
                    sb_szTempString_7 = new StringBuilder(szTempString_7);
                ZeidonStringConcat(sb_szTempString_7, 1, 0, szString, 1, 0, 255);
                szTempString_7 = sb_szTempString_7.toString();
            }
            {
                StringBuilder sb_szTempString_7;
                if (szTempString_7 == null)
                    sb_szTempString_7 = new StringBuilder(32);
                else
                    sb_szTempString_7 = new StringBuilder(szTempString_7);
                ZeidonStringConcat(sb_szTempString_7, 1, 0, "</b>", 1, 0, 255);
                szTempString_7 = sb_szTempString_7.toString();
            }
            SetAttributeFromString(mFAProf, "AwardList", "FallTxt", szTempString_7);
            //:GetStringFromAttributeByContext( szString, mFAProf, "AwardList", "SpringAmount", "Revenue", 30 )
            {
                StringBuilder sb_szString;
                if (szString == null)
                    sb_szString = new StringBuilder(32);
                else
                    sb_szString = new StringBuilder(szString);
                GetStringFromAttributeByContext(sb_szString, mFAProf, "AwardList", "SpringAmount", "Revenue",
                        30);
                szString = sb_szString.toString();
            }
            //:mFAProf.AwardList.SpringTxt = "<b>" + szString + "</b>"
            {
                StringBuilder sb_szTempString_8;
                if (szTempString_8 == null)
                    sb_szTempString_8 = new StringBuilder(32);
                else
                    sb_szTempString_8 = new StringBuilder(szTempString_8);
                ZeidonStringCopy(sb_szTempString_8, 1, 0, "<b>", 1, 0, 255);
                szTempString_8 = sb_szTempString_8.toString();
            }
            {
                StringBuilder sb_szTempString_8;
                if (szTempString_8 == null)
                    sb_szTempString_8 = new StringBuilder(32);
                else
                    sb_szTempString_8 = new StringBuilder(szTempString_8);
                ZeidonStringConcat(sb_szTempString_8, 1, 0, szString, 1, 0, 255);
                szTempString_8 = sb_szTempString_8.toString();
            }
            {
                StringBuilder sb_szTempString_8;
                if (szTempString_8 == null)
                    sb_szTempString_8 = new StringBuilder(32);
                else
                    sb_szTempString_8 = new StringBuilder(szTempString_8);
                ZeidonStringConcat(sb_szTempString_8, 1, 0, "</b>", 1, 0, 255);
                szTempString_8 = sb_szTempString_8.toString();
            }
            SetAttributeFromString(mFAProf, "AwardList", "SpringTxt", szTempString_8);
        }

        //:END

        //:dGroupAllTotal = 0
        dGroupAllTotal = 0;

        //:FOR EACH mFAProf.FinAidCOAItemAssigned 
        RESULT = mFAProf.cursor("FinAidCOAItemAssigned").setFirst().toInt();
        while (RESULT > zCURSOR_UNCHANGED) {

            //:CREATE ENTITY  mFAProf.COAList 
            RESULT = CreateEntity(mFAProf, "COAList", zPOS_AFTER);

            //:mFAProf.COAList.Description = mFAProf.FinAidCOAItem.Description 
            SetAttributeFromAttribute(mFAProf, "COAList", "Description", mFAProf, "FinAidCOAItem",
                    "Description");
            //:mFAProf.COAList.COAItemType = mFAProf.FinAidCOAItem.COAItemType 
            SetAttributeFromAttribute(mFAProf, "COAList", "COAItemType", mFAProf, "FinAidCOAItem",
                    "COAItemType");
            //:mFAProf.COAList.RevenueAmount = mFAProf.FinAidCOAItemAssigned.RevenueAmount 
            SetAttributeFromAttribute(mFAProf, "COAList", "RevenueAmount", mFAProf, "FinAidCOAItemAssigned",
                    "RevenueAmount");
            //:dGroupAllTotal = dGroupAllTotal + mFAProf.FinAidCOAItemAssigned.RevenueAmount
            {
                MutableDouble md_dTempDecimal_14 = new MutableDouble(dTempDecimal_14);
                GetDecimalFromAttribute(md_dTempDecimal_14, mFAProf, "FinAidCOAItemAssigned", "RevenueAmount");
                dTempDecimal_14 = md_dTempDecimal_14.doubleValue();
            }
            dGroupAllTotal = dGroupAllTotal + dTempDecimal_14;
            //:GetStringFromAttributeByContext( szCOANumber, mFAProf, "FinAidCOAItemAssigned", "RevenueAmount", "Revenue",10)
            {
                StringBuilder sb_szCOANumber;
                if (szCOANumber == null)
                    sb_szCOANumber = new StringBuilder(32);
                else
                    sb_szCOANumber = new StringBuilder(szCOANumber);
                GetStringFromAttributeByContext(sb_szCOANumber, mFAProf, "FinAidCOAItemAssigned",
                        "RevenueAmount", "Revenue", 10);
                szCOANumber = sb_szCOANumber.toString();
            }
            //:mFAProf.COAList.RevenueTxt = szCOANumber
            SetAttributeFromString(mFAProf, "COAList", "RevenueTxt", szCOANumber);

            //://szCOAString = szCOAName + szCOANumber
            //://mFAProf.FinAidCOAItemAssigned.COAString = szCOAString 

            //:// Add to Totals
            //:IF mFAProf.FinAidCOAItem.COAItemType = "EDU" OR mFAProf.FinAidCOAItem.COAItemType = "FEE"
            if (CompareAttributeToString(mFAProf, "FinAidCOAItem", "COAItemType", "EDU") == 0
                    || CompareAttributeToString(mFAProf, "FinAidCOAItem", "COAItemType", "FEE") == 0) {
            }

            //:   //mFAProf.AwardLetters.TuitionAndFeesTotal = mFAProf.AwardLetters.TuitionAndFeesTotal + mFAProf.FinAidCOAItemAssigned.RevenueAmount 
            //:END
            //:IF mFAProf.FinAidCOAItem.COAItemType = "COL"
            if (CompareAttributeToString(mFAProf, "FinAidCOAItem", "COAItemType", "COL") == 0) {
            }

            RESULT = mFAProf.cursor("FinAidCOAItemAssigned").setNextContinue().toInt();
            ;
            //:   //mFAProf.AwardLetters.CostOfLivingTotal = mFAProf.AwardLetters.CostOfLivingTotal + mFAProf.FinAidCOAItemAssigned.RevenueAmount 
            //:END
        }

        //:   
        //:END

        //:IF mFAProf.COAList EXISTS 
        lTempInteger_5 = CheckExistenceOfEntity(mFAProf, "COAList");
        if (lTempInteger_5 == 0) {
            //:CREATE ENTITY  mFAProf.COAList first
            RESULT = CreateEntity(mFAProf, "COAList", zPOS_FIRST);
            //:mFAProf.COAList.Description = "Total" 
            SetAttributeFromString(mFAProf, "COAList", "Description", "Total");
            //:mFAProf.COAList.RevenueAmount = dGroupAllTotal 
            SetAttributeFromDecimal(mFAProf, "COAList", "RevenueAmount", dGroupAllTotal);
            //:GetStringFromAttributeByContext( szCOANumber, mFAProf, "COAList", "RevenueAmount", "Revenue",10)
            {
                StringBuilder sb_szCOANumber;
                if (szCOANumber == null)
                    sb_szCOANumber = new StringBuilder(32);
                else
                    sb_szCOANumber = new StringBuilder(szCOANumber);
                GetStringFromAttributeByContext(sb_szCOANumber, mFAProf, "COAList", "RevenueAmount", "Revenue",
                        10);
                szCOANumber = sb_szCOANumber.toString();
            }
            //:mFAProf.COAList.RevenueTxt = "<b>" + szCOANumber + "</b>"
            {
                StringBuilder sb_szTempString_9;
                if (szTempString_9 == null)
                    sb_szTempString_9 = new StringBuilder(32);
                else
                    sb_szTempString_9 = new StringBuilder(szTempString_9);
                ZeidonStringCopy(sb_szTempString_9, 1, 0, "<b>", 1, 0, 255);
                szTempString_9 = sb_szTempString_9.toString();
            }
            {
                StringBuilder sb_szTempString_9;
                if (szTempString_9 == null)
                    sb_szTempString_9 = new StringBuilder(32);
                else
                    sb_szTempString_9 = new StringBuilder(szTempString_9);
                ZeidonStringConcat(sb_szTempString_9, 1, 0, szCOANumber, 1, 0, 255);
                szTempString_9 = sb_szTempString_9.toString();
            }
            {
                StringBuilder sb_szTempString_9;
                if (szTempString_9 == null)
                    sb_szTempString_9 = new StringBuilder(32);
                else
                    sb_szTempString_9 = new StringBuilder(szTempString_9);
                ZeidonStringConcat(sb_szTempString_9, 1, 0, "</b>", 1, 0, 255);
                szTempString_9 = sb_szTempString_9.toString();
            }
            SetAttributeFromString(mFAProf, "COAList", "RevenueTxt", szTempString_9);

            //://mFAProf.AwardLetters.CostOfAttendanceTotal = mFAProf.AwardLetters.TuitionAndFeesTotal + mFAProf.AwardLetters.CostOfLivingTotal  
            //://CREATE ENTITY mFAProf.FinAidCOAItemAssigned  
            //://mFAProf.FinAidCOAItemAssigned.COAString = zTAB + zTAB + zTAB + zTAB + zTAB + "____________"

            //://CREATE ENTITY mFAProf.FinAidCOAItemAssigned  
            //:szCOAName = "Total Cost of Attendance:" + zTAB
            {
                StringBuilder sb_szCOAName;
                if (szCOAName == null)
                    sb_szCOAName = new StringBuilder(32);
                else
                    sb_szCOAName = new StringBuilder(szCOAName);
                ZeidonStringCopy(sb_szCOAName, 1, 0, "Total Cost of Attendance:", 1, 0, 31);
                szCOAName = sb_szCOAName.toString();
            }
            {
                StringBuilder sb_szCOAName;
                if (szCOAName == null)
                    sb_szCOAName = new StringBuilder(32);
                else
                    sb_szCOAName = new StringBuilder(szCOAName);
                ZeidonStringConcat(sb_szCOAName, 1, 0, zTAB, 1, 0, 31);
                szCOAName = sb_szCOAName.toString();
            }
            //://ZeidonStringConvertFromNumber( szSomeNumber, 1, 20, 20, 1, 
            //://                               mFAProf.FinAidProfile.dTotalCOA, "D")
            //:wXferO.Root.WorkRevenue = mFAProf.FinAidProfile.dTotalCOA
            SetAttributeFromAttribute(wXferO, "Root", "WorkRevenue", mFAProf, "FinAidProfile", "dTotalCOA");
            //:GetStringFromAttributeByContext( szCOANumber, wXferO, "Root", "WorkRevenue", "Revenue",10)
            {
                StringBuilder sb_szCOANumber;
                if (szCOANumber == null)
                    sb_szCOANumber = new StringBuilder(32);
                else
                    sb_szCOANumber = new StringBuilder(szCOANumber);
                GetStringFromAttributeByContext(sb_szCOANumber, wXferO, "Root", "WorkRevenue", "Revenue", 10);
                szCOANumber = sb_szCOANumber.toString();
            }

            //:szCOAString = szCOAName + szCOANumber
            {
                StringBuilder sb_szCOAString;
                if (szCOAString == null)
                    sb_szCOAString = new StringBuilder(32);
                else
                    sb_szCOAString = new StringBuilder(szCOAString);
                ZeidonStringCopy(sb_szCOAString, 1, 0, szCOAName, 1, 0, 255);
                szCOAString = sb_szCOAString.toString();
            }
            {
                StringBuilder sb_szCOAString;
                if (szCOAString == null)
                    sb_szCOAString = new StringBuilder(32);
                else
                    sb_szCOAString = new StringBuilder(szCOAString);
                ZeidonStringConcat(sb_szCOAString, 1, 0, szCOANumber, 1, 0, 255);
                szCOAString = sb_szCOAString.toString();
            }
        }

        //:   //mFAProf.FinAidCOAItemAssigned.COAString = szCOAString
        //:END

        //:// On the "Summary" tab we want to show disbursments that have not yet been dispersed.
        //:// I don't think we use this path for anything else so hide those that have been dispersed.
        //:// Not sure if I should put this here or in wStudntD.vml.
        //:FOR mFAProf.PerPeriodFinAidAwardDisbursement WITHIN mFAProf.FinAidProfile 
        RESULT = CheckExistenceOfEntity(mFAProf, "PerPeriodFinAidAwardDisbursement");
        while (RESULT > zCURSOR_UNCHANGED) {
            //://IF mFAProf.PerPeriodFinAidAwardDisbursement.AppliedToAccount = "" OR mFAProf.PerPeriodFinAidAwardDisbursement.Amount  = ""
            //:IF mFAProf.PerPeriodFinAidAwardDisbursement.Amount  = ""
            if (CompareAttributeToString(mFAProf, "PerPeriodFinAidAwardDisbursement", "Amount", "") == 0) {
                //:mFAProf.PerPeriodFinAidAwardDisbursement.wHideTableRow = ""
                SetAttributeFromString(mFAProf, "PerPeriodFinAidAwardDisbursement", "wHideTableRow", "");
                //:ELSE
            } else {
                //:mFAProf.PerPeriodFinAidAwardDisbursement.wHideTableRow = "Y" 
                SetAttributeFromString(mFAProf, "PerPeriodFinAidAwardDisbursement", "wHideTableRow", "Y");
            }

            RESULT = mFAProf.cursor("PerPeriodFinAidAwardDisbursement").setNextContinue().toInt();
            ;
            //:END 
        }

        //:END
    }

    //:END
    return (0);
    //    
    //    /*  This is code from zencas and I currently don't use but will keep just in case...
    //    // Compute Student remaining need as COA - Total Fin Aid
    //    mFAProf.AwardLetters.COA_MinusFinAidTotal = mFAProf.AwardLetters.CostOfAttendanceTotal - mFAProf.AwardLetters.FinAidFullYearTotal 
    //    IF mFAProf.AwardLetters.COA_MinusFinAidTotal < 0 
    //       mFAProf.AwardLetters.COA_MinusFinAidTotal = 0    
    //    END
    //    
    //    // If there is any remaining amount, generate Option Funding entities.
    //    IF mFAProf.AwardLetters.COA_MinusFinAidTotal > 4000
    //       dParentStudentLoan = mFAProf.AwardLetters.COA_MinusFinAidTotal - 4000
    //       dParentStudentLoanHalf = dParentStudentLoan / 2
    //       CREATE ENTITY mFAProf.OptionalFundingGroup 
    //       mFAProf.OptionalFundingGroup.AwardName    = "Summer Earnings"
    //       mFAProf.OptionalFundingGroup.FallAmount   = 1000
    //       mFAProf.OptionalFundingGroup.SpringAmount = 1000
    //       mFAProf.OptionalFundingGroup.Amount       = 2000
    //       szAwardValue = "Summer Earnings" + zTAB + "  1,000.00" + zTAB + "  1,000.00" + zTAB + "  2,000.00"
    //       mFAProf.OptionalFundingGroup.AwardValue = szAwardValue
    //       CREATE ENTITY mFAProf.OptionalFundingGroup 
    //       mFAProf.OptionalFundingGroup.AwardName    = "Student Earnings or Federal Work Study"
    //       mFAProf.OptionalFundingGroup.FallAmount   = 1000
    //       mFAProf.OptionalFundingGroup.SpringAmount = 1000
    //       mFAProf.OptionalFundingGroup.Amount       = 2000
    //       szAwardValue = "Student Earnings/Federal Work Study" + zTAB + "  1,000.00" + zTAB + "  1,000.00" + zTAB + "  2,000.00"
    //       mFAProf.OptionalFundingGroup.AwardValue = szAwardValue
    //       CREATE ENTITY mFAProf.OptionalFundingGroup 
    //       mFAProf.OptionalFundingGroup.AwardName    = "Parent PLUS Loan / Student Loan"
    //       mFAProf.OptionalFundingGroup.FallAmount   = dParentStudentLoanHalf
    //       mFAProf.OptionalFundingGroup.SpringAmount = dParentStudentLoanHalf
    //       mFAProf.OptionalFundingGroup.Amount       = dParentStudentLoan
    //       GetStringFromAttributeByContext( szFallAmount, mFAProf, "OptionalFundingGroup", "FallAmount", "Revenue",10)
    //       //GetStringFromAttributeByContext( szSomeNumber, mFAProf, "OptionalFundingGroup", "FallAmount", "Revenue",10)
    //       //ConvertToString10( szSomeNumber, szFallAmount )
    //       GetStringFromAttributeByContext( szAmount, mFAProf, "OptionalFundingGroup", "Amount", "Revenue",10)
    //       //GetStringFromAttributeByContext( szSomeNumber, mFAProf, "OptionalFundingGroup", "Amount", "Revenue",10)
    //       //ConvertToString10( szSomeNumber, szAmount )
    //       szAwardValue = "Parent PLUS Loan/Student Loan" + zTAB + szFallAmount + zTAB + szFallAmount + zTAB + szAmount
    //       mFAProf.OptionalFundingGroup.AwardValue = szAwardValue
    //    END
    //    */
    // END
}

From source file:com.quinsoft.swauopencuas.mSAProf_Object.java

public int omSAProf_dSubAccountBalance(View mSAProf, String InternalEntityStructure,
        String InternalAttribStructure, Integer GetOrSetFlag) {
    zVIEW mSASubAL = new zVIEW();
    //:DECIMAL dAmount
    double dAmount = 0.0;
    int lTempInteger_0 = 0;
    zVIEW vTempViewVar_0 = new zVIEW();
    int RESULT = 0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF zDERIVED_GET:
    case zDERIVED_GET:
        //:dAmount = 0
        dAmount = 0;/*from   ww w.  jav a2  s. c  o m*/
        //:IF mSAProf.SASubAccount.ClosedDate = "" 
        if (CompareAttributeToString(mSAProf, "SASubAccount", "ClosedDate", "") == 0) {
            //:ACTIVATE mSASubAL WHERE mSASubAL.SASubAccount.ID = mSAProf.SASubAccount.ID 
            {
                MutableInt mi_lTempInteger_0 = new MutableInt(lTempInteger_0);
                GetIntegerFromAttribute(mi_lTempInteger_0, mSAProf, "SASubAccount", "ID");
                lTempInteger_0 = mi_lTempInteger_0.intValue();
            }
            omSAProf_fnLocalBuildQual_19(mSAProf, vTempViewVar_0, lTempInteger_0);
            RESULT = ActivateObjectInstance(mSASubAL, "mSASubAL", mSAProf, vTempViewVar_0, zSINGLE);
            DropView(vTempViewVar_0);
            //:IF RESULT >= 0
            if (RESULT >= 0) {
                //:dAmount = mSASubAL.SASubAccount.dCurrentBalance 
                {
                    MutableDouble md_dAmount = new MutableDouble(dAmount);
                    GetDecimalFromAttribute(md_dAmount, mSASubAL, "SASubAccount", "dCurrentBalance");
                    dAmount = md_dAmount.doubleValue();
                }
            }

            //:END
            //:DropView( mSASubAL )
            DropView(mSASubAL);
        }

        //:END

        //:StoreValueInRecord( mSAProf, InternalEntityStructure, 
        //:                    InternalAttribStructure, dAmount, 0 )
        StoreValueInRecord(mSAProf, InternalEntityStructure, InternalAttribStructure, dAmount, 0);
        break;

    //:/* end zDERIVED_GET */
    //:OF zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:   /* end zDERIVED_SET */
    //:END  /* case */
    return (0);
    // END
}

From source file:com.quinsoft.zencas.mDegTrk_Object.java

public int omDegTrk_dGraduationCredits(View mDegTrk, String InternalEntityStructure,
        String InternalAttribStructure, Integer GetOrSetFlag) {
    zVIEW mStudenC = new zVIEW();
    int RESULT = 0;
    //:DECIMAL GraduationCredits
    double GraduationCredits = 0.0;
    double dTempDecimal_0 = 0.0;
    double dTempDecimal_1 = 0.0;
    double dTempDecimal_2 = 0.0;
    double dTempDecimal_3 = 0.0;
    double dTempDecimal_4 = 0.0;
    double dTempDecimal_5 = 0.0;
    double dTempDecimal_6 = 0.0;
    double dTempDecimal_7 = 0.0;

    RESULT = GetViewByName(mStudenC, "mStudenC", mDegTrk, zLEVEL_TASK);

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF  zDERIVED_GET:
    case zDERIVED_GET:

        //:// Subtract Developmental Credits from wDegreeAuditTotalCreditsTaken.
        //:IF mDegTrk.DegreeMajorCollege.Type = "G"
        if (CompareAttributeToString(mDegTrk, "DegreeMajorCollege", "Type", "G") == 0) {
            //:GraduationCredits = mDegTrk.DegreeTrack.AuditTotalCreditsEarned +
            //:                 mDegTrk.DegreeTrack.AuditEnrolledCredits -
            //:                 mDegTrk.DegreeTrack.dDevelopmentalCredits -
            //:                 mStudenC.Student.dEnrolledCreditsRepeatedGrad
            {/* ww w  . j a v a 2  s  .  c  o m*/
                MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                GetDecimalFromAttribute(md_dTempDecimal_0, mDegTrk, "DegreeTrack", "AuditTotalCreditsEarned");
                dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
            }
            {
                MutableDouble md_dTempDecimal_1 = new MutableDouble(dTempDecimal_1);
                GetDecimalFromAttribute(md_dTempDecimal_1, mDegTrk, "DegreeTrack", "AuditEnrolledCredits");
                dTempDecimal_1 = md_dTempDecimal_1.doubleValue();
            }
            {
                MutableDouble md_dTempDecimal_2 = new MutableDouble(dTempDecimal_2);
                GetDecimalFromAttribute(md_dTempDecimal_2, mDegTrk, "DegreeTrack", "dDevelopmentalCredits");
                dTempDecimal_2 = md_dTempDecimal_2.doubleValue();
            }
            {
                MutableDouble md_dTempDecimal_3 = new MutableDouble(dTempDecimal_3);
                GetDecimalFromAttribute(md_dTempDecimal_3, mStudenC, "Student", "dEnrolledCreditsRepeatedGrad");
                dTempDecimal_3 = md_dTempDecimal_3.doubleValue();
            }
            GraduationCredits = dTempDecimal_0 + dTempDecimal_1 - dTempDecimal_2 - dTempDecimal_3;
            //:ELSE
        } else {
            //:GraduationCredits = mDegTrk.DegreeTrack.AuditTotalCreditsEarned +
            //:                 mDegTrk.DegreeTrack.AuditEnrolledCredits -
            //:                 mDegTrk.DegreeTrack.dDevelopmentalCredits -
            //:                 mStudenC.Student.dEnrolledCreditsRepeated
            {
                MutableDouble md_dTempDecimal_4 = new MutableDouble(dTempDecimal_4);
                GetDecimalFromAttribute(md_dTempDecimal_4, mDegTrk, "DegreeTrack", "AuditTotalCreditsEarned");
                dTempDecimal_4 = md_dTempDecimal_4.doubleValue();
            }
            {
                MutableDouble md_dTempDecimal_5 = new MutableDouble(dTempDecimal_5);
                GetDecimalFromAttribute(md_dTempDecimal_5, mDegTrk, "DegreeTrack", "AuditEnrolledCredits");
                dTempDecimal_5 = md_dTempDecimal_5.doubleValue();
            }
            {
                MutableDouble md_dTempDecimal_6 = new MutableDouble(dTempDecimal_6);
                GetDecimalFromAttribute(md_dTempDecimal_6, mDegTrk, "DegreeTrack", "dDevelopmentalCredits");
                dTempDecimal_6 = md_dTempDecimal_6.doubleValue();
            }
            {
                MutableDouble md_dTempDecimal_7 = new MutableDouble(dTempDecimal_7);
                GetDecimalFromAttribute(md_dTempDecimal_7, mStudenC, "Student", "dEnrolledCreditsRepeated");
                dTempDecimal_7 = md_dTempDecimal_7.doubleValue();
            }
            GraduationCredits = dTempDecimal_4 + dTempDecimal_5 - dTempDecimal_6 - dTempDecimal_7;
        }

        //:END

        //:StoreValueInRecord ( mDegTrk,
        //:                  InternalEntityStructure, InternalAttribStructure, GraduationCredits, 0 )
        StoreValueInRecord(mDegTrk, InternalEntityStructure, InternalAttribStructure, GraduationCredits, 0);
        break;
    //:                     
    //:  /* end zDERIVED_GET */
    //:OF   zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:     /* end zDERIVED_SET */
    //:END  /* case */
    return (0);
    // END
}

From source file:com.quinsoft.zencas.mDegTrk_Object.java

public int omDegTrk_dDevelopmentalCredits(View mDegTrkO, String InternalEntityStructure,
        String InternalAttribStructure, Integer GetOrSetFlag) {
    zVIEW mDegTrk = new zVIEW();
    //:DECIMAL TotalCredits
    double TotalCredits = 0.0;
    int RESULT = 0;
    double dTempDecimal_0 = 0.0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF  zDERIVED_GET:
    case zDERIVED_GET:

        //:// Total Developmental Credits.
        //:CreateViewFromView( mDegTrk, mDegTrkO )
        CreateViewFromView(mDegTrk, mDegTrkO);
        //:TotalCredits = 0 
        TotalCredits = 0;//from w w  w  .  j  a v a 2  s. com
        //:FOR EACH mDegTrk.CourseType1or2 WITHIN mDegTrk.DegreeTrack 
        RESULT = mDegTrk.cursor("CourseType1or2").setFirst("DegreeTrack").toInt();
        while (RESULT > zCURSOR_UNCHANGED) {
            //:IF mDegTrk.CourseType1or2.wDevelopmentalFlag = "Y"
            if (CompareAttributeToString(mDegTrk, "CourseType1or2", "wDevelopmentalFlag", "Y") == 0) {
                //:TotalCredits = TotalCredits + mDegTrk.CourseType1or2.wCreditsTaken
                {
                    MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                    GetDecimalFromAttribute(md_dTempDecimal_0, mDegTrk, "CourseType1or2", "wCreditsTaken");
                    dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
                }
                TotalCredits = TotalCredits + dTempDecimal_0;
            }

            RESULT = mDegTrk.cursor("CourseType1or2").setNextContinue().toInt();
            ;
            //:END
        }

        //:END
        //:DropView( mDegTrk )
        DropView(mDegTrk);

        //:StoreValueInRecord ( mDegTrkO,
        //:                  InternalEntityStructure, InternalAttribStructure, TotalCredits, 0 )
        StoreValueInRecord(mDegTrkO, InternalEntityStructure, InternalAttribStructure, TotalCredits, 0);
        break;

    //:  /* end zDERIVED_GET */
    //:OF   zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:     /* end zDERIVED_SET */
    //:END  /* case */
    return (0);
    // END
}

From source file:com.quinsoft.epamms.mSPLDef_Object.java

public int omSPLDef_GeneratePDF_ClmList(View mSPLDef, View mSPLDefPDF, int lFile, String szPassedBlanks,
        String szWriteBuffer, int NumberColumns) {
    zVIEW mSPLDef2 = new zVIEW();
    //:STRING ( 32000 )  szStatementText
    String szStatementText = null;
    //:STRING ( 32000 )  szTemporaryText
    String szTemporaryText = null;
    //:STRING ( 50 )     szLeadingBlanks
    String szLeadingBlanks = null;
    //:STRING ( 50 )     szBreakName1
    String szBreakName1 = null;//from   w  w w  . ja v a2s  .  c om
    //:STRING ( 50 )     szBreakName2
    String szBreakName2 = null;
    //:STRING ( 10 )     szMarginRight
    String szMarginRight = null;
    //:STRING ( 10 )     szMarginLeft
    String szMarginLeft = null;
    //:STRING ( 100 )    szSectionTitle
    String szSectionTitle = null;
    //:STRING ( 100 )    szStatementTitle
    String szStatementTitle = null;
    //:STRING ( 10 )     szTitleFormat
    String szTitleFormat = null;
    //:STRING ( 50 )     szSectionName
    String szSectionName = null;
    //:STRING ( 10 )     szColumnTop
    String szColumnTop = null;
    //:STRING ( 100 )    szCombinedName
    String szCombinedName = null;
    //:STRING ( 100 )    szFootnoteText
    String szFootnoteText = null;
    //:STRING ( 3 )      szFootnoteNumber
    String szFootnoteNumber = null;
    //:SHORT             nRC
    int nRC = 0;
    //:INTEGER           CurrentColumnNumber
    int CurrentColumnNumber = 0;
    //:INTEGER           ItemCount
    int ItemCount = 0;
    //:INTEGER           FootnoteCount
    int FootnoteCount = 0;
    //:INTEGER           Column1Count
    int Column1Count = 0;
    //:INTEGER           Column2Count
    int Column2Count = 0;
    //:INTEGER           ColumnTotal
    int ColumnTotal = 0;
    //:DECIMAL           ContainingBlockWidth
    double ContainingBlockWidth = 0.0;
    //:DECIMAL           ColumnWidth
    double ColumnWidth = 0.0;
    //:DECIMAL           ColumnHeight
    double ColumnHeight = 0.0;
    //:DECIMAL           OriginalTopMargin
    double OriginalTopMargin = 0.0;
    int RESULT = 0;
    String szTempString_0 = null;
    int lTempInteger_0 = 0;
    int lTempInteger_1 = 0;
    int lTempInteger_2 = 0;
    int lTempInteger_3 = 0;
    int lTempInteger_4 = 0;
    int lTempInteger_5 = 0;
    int lTempInteger_6 = 0;
    int lTempInteger_7 = 0;
    int lTempInteger_8 = 0;
    int lTempInteger_9 = 0;
    int lTempInteger_10 = 0;
    String szTempString_1 = null;
    int lTempInteger_11 = 0;
    int lTempInteger_12 = 0;
    int lTempInteger_13 = 0;
    int lTempInteger_14 = 0;
    double dTempDecimal_0 = 0.0;
    double dTempDecimal_1 = 0.0;
    int lTempInteger_15 = 0;
    double dTempDecimal_2 = 0.0;
    double dTempDecimal_3 = 0.0;
    double dTempDecimal_4 = 0.0;
    double dTempDecimal_5 = 0.0;
    int lTempInteger_16 = 0;

    //:// Generate PDF for a "Directory of Use" or "Marketing" Section.

    //:szLeadingBlanks = szPassedBlanks + "   "
    {
        StringBuilder sb_szLeadingBlanks;
        if (szLeadingBlanks == null)
            sb_szLeadingBlanks = new StringBuilder(32);
        else
            sb_szLeadingBlanks = new StringBuilder(szLeadingBlanks);
        ZeidonStringCopy(sb_szLeadingBlanks, 1, 0, szPassedBlanks, 1, 0, 51);
        szLeadingBlanks = sb_szLeadingBlanks.toString();
    }
    {
        StringBuilder sb_szLeadingBlanks;
        if (szLeadingBlanks == null)
            sb_szLeadingBlanks = new StringBuilder(32);
        else
            sb_szLeadingBlanks = new StringBuilder(szLeadingBlanks);
        ZeidonStringConcat(sb_szLeadingBlanks, 1, 0, "   ", 1, 0, 51);
        szLeadingBlanks = sb_szLeadingBlanks.toString();
    }

    //:// Column List of Claim Usage Statements
    //:// The dependent Claim Usage statements are to be listed in 2 or 3 columns, after any regular Statements
    //:// and organized by Claims Classifications.

    //:// Position on the correct Marketing Section.
    //:SET CURSOR FIRST mSPLDef.SPLD_MarketingSection WHERE mSPLDef.SPLD_MarketingSection.Name = mSPLDefPDF.LLD_Block.Name    
    {
        StringBuilder sb_szTempString_0;
        if (szTempString_0 == null)
            sb_szTempString_0 = new StringBuilder(32);
        else
            sb_szTempString_0 = new StringBuilder(szTempString_0);
        GetStringFromAttribute(sb_szTempString_0, mSPLDefPDF, "LLD_Block", "Name");
        szTempString_0 = sb_szTempString_0.toString();
    }
    RESULT = SetCursorFirstEntityByString(mSPLDef, "SPLD_MarketingSection", "Name", szTempString_0, "");
    //:IF RESULT < zCURSOR_SET
    if (RESULT < zCURSOR_SET) {
        //:IssueError( mSPLDef,0,0, "No match on MarketingSection for Column" )
        IssueError(mSPLDef, 0, 0, "No match on MarketingSection for Column");
    }

    //:END

    //:// Build the list of unique footnotes.
    //:FOR EACH mSPLDef.M_UsageFootnote 
    RESULT = SetCursorFirstEntity(mSPLDef, "M_UsageFootnote", "");
    while (RESULT > zCURSOR_UNCHANGED) {
        //:EXCLUDE mSPLDef.M_UsageFootnote NONE
        RESULT = ExcludeEntity(mSPLDef, "M_UsageFootnote", zREPOS_NONE);
        RESULT = SetCursorNextEntity(mSPLDef, "M_UsageFootnote", "");
    }

    //:END
    //:ItemCount = 0
    ItemCount = 0;
    //:FOR EACH mSPLDef.SPLD_MarketingStatement 
    RESULT = SetCursorFirstEntity(mSPLDef, "SPLD_MarketingStatement", "");
    while (RESULT > zCURSOR_UNCHANGED) {
        //:FOR EACH mSPLDef.SPLD_MarketingUsageOrdering WITHIN mSPLDef.SPLD_MarketingSection
        RESULT = SetCursorFirstEntity(mSPLDef, "SPLD_MarketingUsageOrdering", "SPLD_MarketingSection");
        while (RESULT > zCURSOR_UNCHANGED) {
            //:IF mSPLDef.SPLD_MarketingUsage.UsageType = "C"
            if (CompareAttributeToString(mSPLDef, "SPLD_MarketingUsage", "UsageType", "C") == 0) {
                //:ItemCount = ItemCount + 1
                ItemCount = ItemCount + 1;
                //:SET CURSOR FIRST mSPLDef.SPLD_Usage 
                //:           WHERE mSPLDef.SPLD_Usage.ID = mSPLDef.SPLD_MarketingUsage.ID 
                {
                    MutableInt mi_lTempInteger_0 = new MutableInt(lTempInteger_0);
                    GetIntegerFromAttribute(mi_lTempInteger_0, mSPLDef, "SPLD_MarketingUsage", "ID");
                    lTempInteger_0 = mi_lTempInteger_0.intValue();
                }
                RESULT = SetCursorFirstEntityByInteger(mSPLDef, "SPLD_Usage", "ID", lTempInteger_0, "");
                //:IF RESULT >=zCURSOR_SET
                if (RESULT >= zCURSOR_SET) {
                    //:IF mSPLDef.M_UsageFootnoteUsed EXISTS 
                    lTempInteger_1 = CheckExistenceOfEntity(mSPLDef, "M_UsageFootnoteUsed");
                    if (lTempInteger_1 == 0) {
                        //:SET CURSOR FIRST mSPLDef.M_UsageFootnote 
                        //:           WHERE mSPLDef.M_UsageFootnote.ID = mSPLDef.M_UsageFootnoteUsed.ID 
                        {
                            MutableInt mi_lTempInteger_2 = new MutableInt(lTempInteger_2);
                            GetIntegerFromAttribute(mi_lTempInteger_2, mSPLDef, "M_UsageFootnoteUsed", "ID");
                            lTempInteger_2 = mi_lTempInteger_2.intValue();
                        }
                        RESULT = SetCursorFirstEntityByInteger(mSPLDef, "M_UsageFootnote", "ID", lTempInteger_2,
                                "");
                        //:IF RESULT < zCURSOR_SET
                        if (RESULT < zCURSOR_SET) {
                            //:CREATE ENTITY mSPLDef.M_UsageFootnote 
                            RESULT = CreateEntity(mSPLDef, "M_UsageFootnote", zPOS_AFTER);
                            //:mSPLDef.M_UsageFootnote.ID   = mSPLDef.M_UsageFootnoteUsed.ID 
                            SetAttributeFromAttribute(mSPLDef, "M_UsageFootnote", "ID", mSPLDef,
                                    "M_UsageFootnoteUsed", "ID");
                            //:mSPLDef.M_UsageFootnote.Text = mSPLDef.M_UsageFootnoteUsed.Text 
                            SetAttributeFromAttribute(mSPLDef, "M_UsageFootnote", "Text", mSPLDef,
                                    "M_UsageFootnoteUsed", "Text");
                        }

                        //:END 
                    }

                    //:END
                }

                //:END
            }

            RESULT = SetCursorNextEntity(mSPLDef, "SPLD_MarketingUsageOrdering", "SPLD_MarketingSection");
            //:END
        }

        RESULT = SetCursorNextEntity(mSPLDef, "SPLD_MarketingStatement", "");
        //:END
    }

    //:END
    //:IF ItemCount = 0
    if (ItemCount == 0) {
        //:// There are no Claims entries, so give error and exit.
        //:MessageSend( mSPLDef, "", "Generate Label",
        //:             "The Marketing Section for Column list has no Claim entries.",
        //:             zMSGQ_OBJECT_CONSTRAINT_ERROR, 0 )
        MessageSend(mSPLDef, "", "Generate Label",
                "The Marketing Section for Column list has no Claim entries.", zMSGQ_OBJECT_CONSTRAINT_ERROR,
                0);
        //:RETURN 2
        if (8 == 8)
            return (2);
    }

    //:END

    //:FootnoteCount = 0
    FootnoteCount = 0;
    //:FOR EACH mSPLDef.M_UsageFootnote 
    RESULT = SetCursorFirstEntity(mSPLDef, "M_UsageFootnote", "");
    while (RESULT > zCURSOR_UNCHANGED) {
        //:FootnoteCount = FootnoteCount + 1
        FootnoteCount = FootnoteCount + 1;
        //:ItemCount     = ItemCount + 1  // Also add to total item count.
        ItemCount = ItemCount + 1;
        //:mSPLDef.M_UsageFootnote.wFootNoteRelativeNumber = FootnoteCount
        SetAttributeFromInteger(mSPLDef, "M_UsageFootnote", "wFootNoteRelativeNumber", FootnoteCount);
        RESULT = SetCursorNextEntity(mSPLDef, "M_UsageFootnote", "");
    }

    //:END

    //:// Set the work attribute with combination Usage Name and Footnote designator.
    //:FOR EACH mSPLDef.SPLD_MarketingStatement 
    RESULT = SetCursorFirstEntity(mSPLDef, "SPLD_MarketingStatement", "");
    while (RESULT > zCURSOR_UNCHANGED) {
        //:FOR EACH mSPLDef.SPLD_MarketingUsageOrdering WITHIN mSPLDef.SPLD_MarketingSection
        RESULT = SetCursorFirstEntity(mSPLDef, "SPLD_MarketingUsageOrdering", "SPLD_MarketingSection");
        while (RESULT > zCURSOR_UNCHANGED) {
            //:szCombinedName = mSPLDef.SPLD_MarketingUsage.Name 
            {
                MutableInt mi_lTempInteger_3 = new MutableInt(lTempInteger_3);
                StringBuilder sb_szCombinedName;
                if (szCombinedName == null)
                    sb_szCombinedName = new StringBuilder(32);
                else
                    sb_szCombinedName = new StringBuilder(szCombinedName);
                GetVariableFromAttribute(sb_szCombinedName, mi_lTempInteger_3, 'S', 101, mSPLDef,
                        "SPLD_MarketingUsage", "Name", "", 0);
                lTempInteger_3 = mi_lTempInteger_3.intValue();
                szCombinedName = sb_szCombinedName.toString();
            }
            //:SET CURSOR FIRST mSPLDef.SPLD_Usage 
            //:           WHERE mSPLDef.SPLD_Usage.ID = mSPLDef.SPLD_MarketingUsage.ID 
            {
                MutableInt mi_lTempInteger_4 = new MutableInt(lTempInteger_4);
                GetIntegerFromAttribute(mi_lTempInteger_4, mSPLDef, "SPLD_MarketingUsage", "ID");
                lTempInteger_4 = mi_lTempInteger_4.intValue();
            }
            RESULT = SetCursorFirstEntityByInteger(mSPLDef, "SPLD_Usage", "ID", lTempInteger_4, "");
            //:IF RESULT >=zCURSOR_SET
            if (RESULT >= zCURSOR_SET) {
                //:IF mSPLDef.M_UsageFootnoteUsed EXISTS 
                lTempInteger_5 = CheckExistenceOfEntity(mSPLDef, "M_UsageFootnoteUsed");
                if (lTempInteger_5 == 0) {
                    //:SET CURSOR FIRST mSPLDef.M_UsageFootnote 
                    //:           WHERE mSPLDef.M_UsageFootnote.ID = mSPLDef.M_UsageFootnoteUsed.ID 
                    {
                        MutableInt mi_lTempInteger_6 = new MutableInt(lTempInteger_6);
                        GetIntegerFromAttribute(mi_lTempInteger_6, mSPLDef, "M_UsageFootnoteUsed", "ID");
                        lTempInteger_6 = mi_lTempInteger_6.intValue();
                    }
                    RESULT = SetCursorFirstEntityByInteger(mSPLDef, "M_UsageFootnote", "ID", lTempInteger_6,
                            "");
                    //:szFootnoteNumber = mSPLDef.M_UsageFootnote.wFootNoteRelativeNumber 
                    {
                        MutableInt mi_lTempInteger_7 = new MutableInt(lTempInteger_7);
                        StringBuilder sb_szFootnoteNumber;
                        if (szFootnoteNumber == null)
                            sb_szFootnoteNumber = new StringBuilder(32);
                        else
                            sb_szFootnoteNumber = new StringBuilder(szFootnoteNumber);
                        GetVariableFromAttribute(sb_szFootnoteNumber, mi_lTempInteger_7, 'S', 4, mSPLDef,
                                "M_UsageFootnote", "wFootNoteRelativeNumber", "", 0);
                        lTempInteger_7 = mi_lTempInteger_7.intValue();
                        szFootnoteNumber = sb_szFootnoteNumber.toString();
                    }
                    //:szCombinedName = szCombinedName + "<sup> " + szFootnoteNumber + "</sup>"
                    {
                        StringBuilder sb_szCombinedName;
                        if (szCombinedName == null)
                            sb_szCombinedName = new StringBuilder(32);
                        else
                            sb_szCombinedName = new StringBuilder(szCombinedName);
                        ZeidonStringConcat(sb_szCombinedName, 1, 0, "<sup> ", 1, 0, 101);
                        szCombinedName = sb_szCombinedName.toString();
                    }
                    {
                        StringBuilder sb_szCombinedName;
                        if (szCombinedName == null)
                            sb_szCombinedName = new StringBuilder(32);
                        else
                            sb_szCombinedName = new StringBuilder(szCombinedName);
                        ZeidonStringConcat(sb_szCombinedName, 1, 0, szFootnoteNumber, 1, 0, 101);
                        szCombinedName = sb_szCombinedName.toString();
                    }
                    {
                        StringBuilder sb_szCombinedName;
                        if (szCombinedName == null)
                            sb_szCombinedName = new StringBuilder(32);
                        else
                            sb_szCombinedName = new StringBuilder(szCombinedName);
                        ZeidonStringConcat(sb_szCombinedName, 1, 0, "</sup>", 1, 0, 101);
                        szCombinedName = sb_szCombinedName.toString();
                    }
                }

                //:END
                //:mSPLDef.SPLD_MarketingUsage.wNameWithFootnoteDesignator = szCombinedName
                SetAttributeFromString(mSPLDef, "SPLD_MarketingUsage", "wNameWithFootnoteDesignator",
                        szCombinedName);
            }

            RESULT = SetCursorNextEntity(mSPLDef, "SPLD_MarketingUsageOrdering", "SPLD_MarketingSection");
            //:END
        }

        RESULT = SetCursorNextEntity(mSPLDef, "SPLD_MarketingStatement", "");
        //:END
    }

    //:END

    //:// Build the two or three columns subobjects from the SPLD_MarketingUsageOrdering entities.
    //:// If specific breaks have been specified, break there. If not, put the same number of entries in each column.
    //:IF mSPLDefPDF.LLD_Block.UsageColumn1BreakName = ""
    if (CompareAttributeToString(mSPLDefPDF, "LLD_Block", "UsageColumn1BreakName", "") == 0) {
        //:Column1Count = ItemCount / NumberColumns
        Column1Count = ItemCount / NumberColumns;
        //:ColumnTotal = Column1Count * NumberColumns
        ColumnTotal = Column1Count * NumberColumns;
        //:IF ColumnTotal < ItemCount
        if (ColumnTotal < ItemCount) {
            //:// Since column aren't going to be equal, add one to first and second columns.
            //:Column1Count = Column1Count + 1
            Column1Count = Column1Count + 1;
        }

        //:END
        //:Column2Count = Column1Count * 2    // The last count of the second column is twice the last count of the first.
        Column2Count = Column1Count * 2;
        //:ItemCount = 0
        ItemCount = 0;
        //:FOR EACH mSPLDef.SPLD_MarketingUsageOrdering WITHIN mSPLDef.SPLD_MarketingSection 
        RESULT = SetCursorFirstEntity(mSPLDef, "SPLD_MarketingUsageOrdering", "SPLD_MarketingSection");
        while (RESULT > zCURSOR_UNCHANGED) {
            //:IF mSPLDef.SPLD_MarketingUsage.UsageType = "C"
            if (CompareAttributeToString(mSPLDef, "SPLD_MarketingUsage", "UsageType", "C") == 0) {
                //:ItemCount = ItemCount + 1
                ItemCount = ItemCount + 1;
                //:IF ItemCount <= Column1Count
                if (ItemCount <= Column1Count) {
                    //:CREATE ENTITY mSPLDef.DisplayUsageColumn1 
                    RESULT = CreateEntity(mSPLDef, "DisplayUsageColumn1", zPOS_AFTER);
                    //:mSPLDef.DisplayUsageColumn1.Name = mSPLDef.SPLD_MarketingUsage.wNameWithFootnoteDesignator 
                    SetAttributeFromAttribute(mSPLDef, "DisplayUsageColumn1", "Name", mSPLDef,
                            "SPLD_MarketingUsage", "wNameWithFootnoteDesignator");
                    //:ELSE
                } else {
                    //:IF ItemCount > Column1Count AND ItemCount <= Column2Count
                    if (ItemCount > Column1Count && ItemCount <= Column2Count) {
                        //:CREATE ENTITY mSPLDef.DisplayUsageColumn2 
                        RESULT = CreateEntity(mSPLDef, "DisplayUsageColumn2", zPOS_AFTER);
                        //:mSPLDef.DisplayUsageColumn2.Name = mSPLDef.SPLD_MarketingUsage.wNameWithFootnoteDesignator 
                        SetAttributeFromAttribute(mSPLDef, "DisplayUsageColumn2", "Name", mSPLDef,
                                "SPLD_MarketingUsage", "wNameWithFootnoteDesignator");
                        //:ELSE
                    } else {
                        //:CREATE ENTITY mSPLDef.DisplayUsageColumn3  
                        RESULT = CreateEntity(mSPLDef, "DisplayUsageColumn3", zPOS_AFTER);
                        //:mSPLDef.DisplayUsageColumn3.Name = mSPLDef.SPLD_MarketingUsage.wNameWithFootnoteDesignator 
                        SetAttributeFromAttribute(mSPLDef, "DisplayUsageColumn3", "Name", mSPLDef,
                                "SPLD_MarketingUsage", "wNameWithFootnoteDesignator");
                    }

                    //:END 
                }

                //:END
            }

            RESULT = SetCursorNextEntity(mSPLDef, "SPLD_MarketingUsageOrdering", "SPLD_MarketingSection");
            //:END
        }

        //:END

        //:// Set CurrentColumnNumber for any footnote processing below.
        //:IF ItemCount <= Column1Count
        if (ItemCount <= Column1Count) {
            //:CurrentColumnNumber = 1
            CurrentColumnNumber = 1;
            //:ELSE
        } else {
            //:IF ItemCount <= Column2Count
            if (ItemCount <= Column2Count) {
                //:CurrentColumnNumber = 2
                CurrentColumnNumber = 2;
                //:ELSE
            } else {
                //:CurrentColumnNumber = 3
                CurrentColumnNumber = 3;
            }

            //:END
        }

        //:END

        //:ELSE
    } else {
        //:// Specific Breaks have been specified.
        //:szBreakName1 = mSPLDefPDF.LLD_Block.UsageColumn1BreakName 
        {
            MutableInt mi_lTempInteger_8 = new MutableInt(lTempInteger_8);
            StringBuilder sb_szBreakName1;
            if (szBreakName1 == null)
                sb_szBreakName1 = new StringBuilder(32);
            else
                sb_szBreakName1 = new StringBuilder(szBreakName1);
            GetVariableFromAttribute(sb_szBreakName1, mi_lTempInteger_8, 'S', 51, mSPLDefPDF, "LLD_Block",
                    "UsageColumn1BreakName", "", 0);
            lTempInteger_8 = mi_lTempInteger_8.intValue();
            szBreakName1 = sb_szBreakName1.toString();
        }
        //:szBreakName2 = mSPLDefPDF.LLD_Block.UsageColumn2BreakName 
        {
            MutableInt mi_lTempInteger_9 = new MutableInt(lTempInteger_9);
            StringBuilder sb_szBreakName2;
            if (szBreakName2 == null)
                sb_szBreakName2 = new StringBuilder(32);
            else
                sb_szBreakName2 = new StringBuilder(szBreakName2);
            GetVariableFromAttribute(sb_szBreakName2, mi_lTempInteger_9, 'S', 51, mSPLDefPDF, "LLD_Block",
                    "UsageColumn2BreakName", "", 0);
            lTempInteger_9 = mi_lTempInteger_9.intValue();
            szBreakName2 = sb_szBreakName2.toString();
        }
        //:CurrentColumnNumber = 1
        CurrentColumnNumber = 1;
        //:FOR EACH mSPLDef.SPLD_MarketingUsageOrdering WITHIN mSPLDef.SPLD_MarketingSection 
        RESULT = SetCursorFirstEntity(mSPLDef, "SPLD_MarketingUsageOrdering", "SPLD_MarketingSection");
        while (RESULT > zCURSOR_UNCHANGED) {
            //:IF mSPLDef.SPLD_MarketingUsage.UsageType = "C"
            if (CompareAttributeToString(mSPLDef, "SPLD_MarketingUsage", "UsageType", "C") == 0) {
                //:IF mSPLDef.SPLD_MarketingUsage.Name = szBreakName1
                if (CompareAttributeToString(mSPLDef, "SPLD_MarketingUsage", "Name", szBreakName1) == 0) {
                    //:CurrentColumnNumber = 2
                    CurrentColumnNumber = 2;
                    //:ELSE
                } else {
                    //:IF mSPLDef.SPLD_MarketingUsage.Name = szBreakName2
                    if (CompareAttributeToString(mSPLDef, "SPLD_MarketingUsage", "Name", szBreakName2) == 0) {
                        //:CurrentColumnNumber = 3
                        CurrentColumnNumber = 3;
                    }

                    //:END
                }

                //:END
                //:IF CurrentColumnNumber = 1
                if (CurrentColumnNumber == 1) {
                    //:CREATE ENTITY mSPLDef.DisplayUsageColumn1 
                    RESULT = CreateEntity(mSPLDef, "DisplayUsageColumn1", zPOS_AFTER);
                    //:mSPLDef.DisplayUsageColumn1.Name = mSPLDef.SPLD_MarketingUsage.wNameWithFootnoteDesignator 
                    SetAttributeFromAttribute(mSPLDef, "DisplayUsageColumn1", "Name", mSPLDef,
                            "SPLD_MarketingUsage", "wNameWithFootnoteDesignator");
                    //:ELSE
                } else {
                    //:IF CurrentColumnNumber = 2
                    if (CurrentColumnNumber == 2) {
                        //:CREATE ENTITY mSPLDef.DisplayUsageColumn2 
                        RESULT = CreateEntity(mSPLDef, "DisplayUsageColumn2", zPOS_AFTER);
                        //:mSPLDef.DisplayUsageColumn2.Name = mSPLDef.SPLD_MarketingUsage.wNameWithFootnoteDesignator 
                        SetAttributeFromAttribute(mSPLDef, "DisplayUsageColumn2", "Name", mSPLDef,
                                "SPLD_MarketingUsage", "wNameWithFootnoteDesignator");
                        //:ELSE
                    } else {
                        //:CREATE ENTITY mSPLDef.DisplayUsageColumn3  
                        RESULT = CreateEntity(mSPLDef, "DisplayUsageColumn3", zPOS_AFTER);
                        //:mSPLDef.DisplayUsageColumn3.Name = mSPLDef.SPLD_MarketingUsage.wNameWithFootnoteDesignator 
                        SetAttributeFromAttribute(mSPLDef, "DisplayUsageColumn3", "Name", mSPLDef,
                                "SPLD_MarketingUsage", "wNameWithFootnoteDesignator");
                    }

                    //:END
                }

                //:END
            }

            RESULT = SetCursorNextEntity(mSPLDef, "SPLD_MarketingUsageOrdering", "SPLD_MarketingSection");
            //:END
        }

        //:END
    }

    //:END

    //:// Add any Footnote entries to the last Column.
    //:FOR EACH mSPLDef.M_UsageFootnote 
    RESULT = SetCursorFirstEntity(mSPLDef, "M_UsageFootnote", "");
    while (RESULT > zCURSOR_UNCHANGED) {
        //:szFootnoteNumber = mSPLDef.M_UsageFootnote.wFootNoteRelativeNumber 
        {
            MutableInt mi_lTempInteger_10 = new MutableInt(lTempInteger_10);
            StringBuilder sb_szFootnoteNumber;
            if (szFootnoteNumber == null)
                sb_szFootnoteNumber = new StringBuilder(32);
            else
                sb_szFootnoteNumber = new StringBuilder(szFootnoteNumber);
            GetVariableFromAttribute(sb_szFootnoteNumber, mi_lTempInteger_10, 'S', 4, mSPLDef,
                    "M_UsageFootnote", "wFootNoteRelativeNumber", "", 0);
            lTempInteger_10 = mi_lTempInteger_10.intValue();
            szFootnoteNumber = sb_szFootnoteNumber.toString();
        }
        //:szFootnoteText = "<sup> " + szFootnoteNumber + "</sup>" + mSPLDef.M_UsageFootnote.Text 
        {
            StringBuilder sb_szFootnoteText;
            if (szFootnoteText == null)
                sb_szFootnoteText = new StringBuilder(32);
            else
                sb_szFootnoteText = new StringBuilder(szFootnoteText);
            ZeidonStringCopy(sb_szFootnoteText, 1, 0, "<sup> ", 1, 0, 101);
            szFootnoteText = sb_szFootnoteText.toString();
        }
        {
            StringBuilder sb_szFootnoteText;
            if (szFootnoteText == null)
                sb_szFootnoteText = new StringBuilder(32);
            else
                sb_szFootnoteText = new StringBuilder(szFootnoteText);
            ZeidonStringConcat(sb_szFootnoteText, 1, 0, szFootnoteNumber, 1, 0, 101);
            szFootnoteText = sb_szFootnoteText.toString();
        }
        {
            StringBuilder sb_szFootnoteText;
            if (szFootnoteText == null)
                sb_szFootnoteText = new StringBuilder(32);
            else
                sb_szFootnoteText = new StringBuilder(szFootnoteText);
            ZeidonStringConcat(sb_szFootnoteText, 1, 0, "</sup>", 1, 0, 101);
            szFootnoteText = sb_szFootnoteText.toString();
        }
        {
            MutableInt mi_lTempInteger_11 = new MutableInt(lTempInteger_11);
            StringBuilder sb_szTempString_1;
            if (szTempString_1 == null)
                sb_szTempString_1 = new StringBuilder(32);
            else
                sb_szTempString_1 = new StringBuilder(szTempString_1);
            GetVariableFromAttribute(sb_szTempString_1, mi_lTempInteger_11, 'S', 255, mSPLDef,
                    "M_UsageFootnote", "Text", "", 0);
            lTempInteger_11 = mi_lTempInteger_11.intValue();
            szTempString_1 = sb_szTempString_1.toString();
        }
        {
            StringBuilder sb_szFootnoteText;
            if (szFootnoteText == null)
                sb_szFootnoteText = new StringBuilder(32);
            else
                sb_szFootnoteText = new StringBuilder(szFootnoteText);
            ZeidonStringConcat(sb_szFootnoteText, 1, 0, szTempString_1, 1, 0, 101);
            szFootnoteText = sb_szFootnoteText.toString();
        }
        //:IF CurrentColumnNumber = 1
        if (CurrentColumnNumber == 1) {
            //:CREATE ENTITY mSPLDef.DisplayUsageColumn1 
            RESULT = CreateEntity(mSPLDef, "DisplayUsageColumn1", zPOS_AFTER);
            //:mSPLDef.DisplayUsageColumn1.Name = szFootnoteText 
            SetAttributeFromString(mSPLDef, "DisplayUsageColumn1", "Name", szFootnoteText);
            //:ELSE
        } else {
            //:IF CurrentColumnNumber = 2
            if (CurrentColumnNumber == 2) {
                //:CREATE ENTITY mSPLDef.DisplayUsageColumn2 
                RESULT = CreateEntity(mSPLDef, "DisplayUsageColumn2", zPOS_AFTER);
                //:mSPLDef.DisplayUsageColumn2.Name = szFootnoteText
                SetAttributeFromString(mSPLDef, "DisplayUsageColumn2", "Name", szFootnoteText);
                //:ELSE
            } else {
                //:CREATE ENTITY mSPLDef.DisplayUsageColumn3  
                RESULT = CreateEntity(mSPLDef, "DisplayUsageColumn3", zPOS_AFTER);
                //:mSPLDef.DisplayUsageColumn3.Name = szFootnoteText
                SetAttributeFromString(mSPLDef, "DisplayUsageColumn3", "Name", szFootnoteText);
            }

            //:END 
        }

        RESULT = SetCursorNextEntity(mSPLDef, "M_UsageFootnote", "");
        //:END
    }

    //:END

    //:// Build the two or three Blocks listing the entries in each of the three work subobjects.
    //:// If there is a Column definition entry, we will get the Top, Width and LeftMargin values from there.
    //:// If not, the width of each Block (column) will be 1/2 or 1/3 of the width of the source Block, minus the left margin,
    //:// which is from the main block.
    //:// We will create a temporary Block, initialized from the source Block, with the modified values for
    //:// each of the three columns.

    //:ACTIVATE mSPLDef2 EMPTY 
    RESULT = ActivateEmptyObjectInstance(mSPLDef2, "mSPLDef", mSPLDef, zSINGLE);
    //:NAME VIEW mSPLDef2 "mSPLDef2"
    SetNameForView(mSPLDef2, "mSPLDef2", null, zLEVEL_TASK);
    //:CREATE ENTITY mSPLDef2.SubregPhysicalLabelDef 
    RESULT = CreateEntity(mSPLDef2, "SubregPhysicalLabelDef", zPOS_AFTER);
    //:CREATE ENTITY mSPLDef2.SPLD_LLD 
    RESULT = CreateEntity(mSPLDef2, "SPLD_LLD", zPOS_AFTER);
    //:CREATE ENTITY mSPLDef2.LLD_Page 
    RESULT = CreateEntity(mSPLDef2, "LLD_Page", zPOS_AFTER);
    //:CREATE ENTITY mSPLDef2.LLD_Panel   
    RESULT = CreateEntity(mSPLDef2, "LLD_Panel", zPOS_AFTER);
    //:CREATE ENTITY mSPLDef2.LLD_Block 
    RESULT = CreateEntity(mSPLDef2, "LLD_Block", zPOS_AFTER);
    //:SetMatchingAttributesByName( mSPLDef2, "LLD_Block", mSPLDefPDF, "LLD_Block", zSET_ALL ) 
    SetMatchingAttributesByName(mSPLDef2, "LLD_Block", mSPLDefPDF, "LLD_Block", zSET_ALL);

    //:ContainingBlockWidth = mSPLDefPDF.LLD_Block.Width
    {
        MutableDouble md_ContainingBlockWidth = new MutableDouble(ContainingBlockWidth);
        GetDecimalFromAttribute(md_ContainingBlockWidth, mSPLDefPDF, "LLD_Block", "Width");
        ContainingBlockWidth = md_ContainingBlockWidth.doubleValue();
    }
    //:ColumnWidth = ContainingBlockWidth / NumberColumns
    ColumnWidth = ContainingBlockWidth / NumberColumns;
    //:mSPLDef2.LLD_Block.Width = ColumnWidth
    SetAttributeFromDecimal(mSPLDef2, "LLD_Block", "Width", ColumnWidth);
    //:mSPLDef2.LLD_Block.Left  = 0
    SetAttributeFromInteger(mSPLDef2, "LLD_Block", "Left", 0);

    //:// The top will be whatever is in the Block, plus any top margin for the Column List LLD_SpecialSectionAttribute.
    //: 
    //:SET CURSOR FIRST mSPLDefPDF.LLD_SpecialSectionAttribute WHERE mSPLDefPDF.LLD_SpecialSectionAttribute.Name = "Column List"
    RESULT = SetCursorFirstEntityByString(mSPLDefPDF, "LLD_SpecialSectionAttribute", "Name", "Column List", "");
    //:IF RESULT >= zCURSOR_SET
    if (RESULT >= zCURSOR_SET) {
        //:mSPLDef2.LLD_Block.Top = mSPLDefPDF.LLD_SpecialSectionAttrBlock.MarginTop 
        SetAttributeFromAttribute(mSPLDef2, "LLD_Block", "Top", mSPLDefPDF, "LLD_SpecialSectionAttrBlock",
                "MarginTop");
        //:szColumnTop = mSPLDef2.LLD_Block.Top
        {
            MutableInt mi_lTempInteger_12 = new MutableInt(lTempInteger_12);
            StringBuilder sb_szColumnTop;
            if (szColumnTop == null)
                sb_szColumnTop = new StringBuilder(32);
            else
                sb_szColumnTop = new StringBuilder(szColumnTop);
            GetVariableFromAttribute(sb_szColumnTop, mi_lTempInteger_12, 'S', 11, mSPLDef2, "LLD_Block", "Top",
                    "", 0);
            lTempInteger_12 = mi_lTempInteger_12.intValue();
            szColumnTop = sb_szColumnTop.toString();
        }
        //:// The MarginTop of LLD_SpecialSectionAttrBlock is used only for specifying the BlockContainer holding the individual entries
        //:// within a column, but not for each entry within a column. Thus we need set two different values, the Original TopMargin
        //:// value for the BlockContainer and null for each row. Because we're modifying the TopMargin value in the object, we need
        //:// to reset it in the end.
        //:// We will create mSPLDef2 for generating the BlockContainer for the column and use mSPLDefPDF for each row.
        //:OriginalTopMargin = mSPLDefPDF.LLD_SpecialSectionAttrBlock.MarginTop
        {
            MutableDouble md_OriginalTopMargin = new MutableDouble(OriginalTopMargin);
            GetDecimalFromAttribute(md_OriginalTopMargin, mSPLDefPDF, "LLD_SpecialSectionAttrBlock",
                    "MarginTop");
            OriginalTopMargin = md_OriginalTopMargin.doubleValue();
        }
        //:szMarginLeft       = mSPLDefPDF.LLD_SpecialSectionAttrBlock.MarginLeft 
        {
            MutableInt mi_lTempInteger_13 = new MutableInt(lTempInteger_13);
            StringBuilder sb_szMarginLeft;
            if (szMarginLeft == null)
                sb_szMarginLeft = new StringBuilder(32);
            else
                sb_szMarginLeft = new StringBuilder(szMarginLeft);
            GetVariableFromAttribute(sb_szMarginLeft, mi_lTempInteger_13, 'S', 11, mSPLDefPDF,
                    "LLD_SpecialSectionAttrBlock", "MarginLeft", "", 0);
            lTempInteger_13 = mi_lTempInteger_13.intValue();
            szMarginLeft = sb_szMarginLeft.toString();
        }
        //:szMarginRight      = mSPLDefPDF.LLD_SpecialSectionAttrBlock.MarginRight
        {
            MutableInt mi_lTempInteger_14 = new MutableInt(lTempInteger_14);
            StringBuilder sb_szMarginRight;
            if (szMarginRight == null)
                sb_szMarginRight = new StringBuilder(32);
            else
                sb_szMarginRight = new StringBuilder(szMarginRight);
            GetVariableFromAttribute(sb_szMarginRight, mi_lTempInteger_14, 'S', 11, mSPLDefPDF,
                    "LLD_SpecialSectionAttrBlock", "MarginRight", "", 0);
            lTempInteger_14 = mi_lTempInteger_14.intValue();
            szMarginRight = sb_szMarginRight.toString();
        }

        //:// Create a Block LLD_SpecialSectionAttribute entry containing the characteristics of the Column List entry, except for dropping
        //:// the top margin.
        //:CREATE ENTITY mSPLDef2.LLD_SpecialSectionAttribute 
        RESULT = CreateEntity(mSPLDef2, "LLD_SpecialSectionAttribute", zPOS_AFTER);
        //:mSPLDef2.LLD_SpecialSectionAttribute.Name = "Block" 
        SetAttributeFromString(mSPLDef2, "LLD_SpecialSectionAttribute", "Name", "Block");
        //:CREATE ENTITY mSPLDef2.LLD_SpecialSectionAttrBlock 
        RESULT = CreateEntity(mSPLDef2, "LLD_SpecialSectionAttrBlock", zPOS_AFTER);
        //:SetMatchingAttributesByName( mSPLDef2, "LLD_SpecialSectionAttrBlock", mSPLDefPDF, "LLD_SpecialSectionAttrBlock", zSET_ALL )
        SetMatchingAttributesByName(mSPLDef2, "LLD_SpecialSectionAttrBlock", mSPLDefPDF,
                "LLD_SpecialSectionAttrBlock", zSET_ALL);
        //:mSPLDefPDF.LLD_SpecialSectionAttrBlock.MarginTop = ""     // Now set MarginTop for each row.
        SetAttributeFromString(mSPLDefPDF, "LLD_SpecialSectionAttrBlock", "MarginTop", "");
        //:ELSE
    } else {

        //:mSPLDef2.LLD_Block.Top = mSPLDef2.LLD_Block.Top
        SetAttributeFromAttribute(mSPLDef2, "LLD_Block", "Top", mSPLDef2, "LLD_Block", "Top");
        //:szMarginLeft  = ".01"
        {
            StringBuilder sb_szMarginLeft;
            if (szMarginLeft == null)
                sb_szMarginLeft = new StringBuilder(32);
            else
                sb_szMarginLeft = new StringBuilder(szMarginLeft);
            ZeidonStringCopy(sb_szMarginLeft, 1, 0, ".01", 1, 0, 11);
            szMarginLeft = sb_szMarginLeft.toString();
        }
        //:szMarginRight = ".01"
        {
            StringBuilder sb_szMarginRight;
            if (szMarginRight == null)
                sb_szMarginRight = new StringBuilder(32);
            else
                sb_szMarginRight = new StringBuilder(szMarginRight);
            ZeidonStringCopy(sb_szMarginRight, 1, 0, ".01", 1, 0, 11);
            szMarginRight = sb_szMarginRight.toString();
        }
    }

    //:END
    //:ColumnHeight = mSPLDefPDF.LLD_Block.Height - mSPLDef2.LLD_Block.Top
    {
        MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
        GetDecimalFromAttribute(md_dTempDecimal_0, mSPLDefPDF, "LLD_Block", "Height");
        dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
    }
    {
        MutableDouble md_dTempDecimal_1 = new MutableDouble(dTempDecimal_1);
        GetDecimalFromAttribute(md_dTempDecimal_1, mSPLDef2, "LLD_Block", "Top");
        dTempDecimal_1 = md_dTempDecimal_1.doubleValue();
    }
    ColumnHeight = dTempDecimal_0 - dTempDecimal_1;
    //:mSPLDef2.LLD_Block.Height = ColumnHeight
    SetAttributeFromDecimal(mSPLDef2, "LLD_Block", "Height", ColumnHeight);

    //:szSectionName = mSPLDef.DisplaySection.XML_SectionName 
    {
        MutableInt mi_lTempInteger_15 = new MutableInt(lTempInteger_15);
        StringBuilder sb_szSectionName;
        if (szSectionName == null)
            sb_szSectionName = new StringBuilder(32);
        else
            sb_szSectionName = new StringBuilder(szSectionName);
        GetVariableFromAttribute(sb_szSectionName, mi_lTempInteger_15, 'S', 51, mSPLDef, "DisplaySection",
                "XML_SectionName", "", 0);
        lTempInteger_15 = mi_lTempInteger_15.intValue();
        szSectionName = sb_szSectionName.toString();
    }

    //:// Generate column 1 Block.
    //:FormatBlockContainer( mSPLDef2, mSPLDef, lFile, szLeadingBlanks, szWriteBuffer, szColumnTop )
    omSPLDef_FormatBlockContainer(mSPLDef2, mSPLDef, lFile, szLeadingBlanks, szWriteBuffer, szColumnTop);

    //:szWriteBuffer = szLeadingBlanks + "   <xsl:for-each select=^SubregPhysicalLabelDef/" + szSectionName + "/DisplayUsageColumn1^>"
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "   <xsl:for-each select=^SubregPhysicalLabelDef/", 1, 0,
                32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, szSectionName, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "/DisplayUsageColumn1^>", 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
    try {
        {
            ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
            m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
            // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
        }
        ;
    } catch (Exception e) {
        throw ZeidonException.wrapException(e);
    }

    //:szWriteBuffer = szLeadingBlanks + "      <fo:block "
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "      <fo:block ", 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:AddFormatToSpecialText( mSPLDefPDF, "Column List", szWriteBuffer )
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        omSPLDef_AddFormatToSpecialText(mSPLDefPDF, "Column List", sb_szWriteBuffer);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
    try {
        {
            ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
            m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
            // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
        }
        ;
    } catch (Exception e) {
        throw ZeidonException.wrapException(e);
    }

    //:szWriteBuffer = szLeadingBlanks + "         <xsl:apply-templates select=^Name^/>"
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "         <xsl:apply-templates select=^Name^/>", 1, 0,
                32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
    try {
        {
            ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
            m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
            // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
        }
        ;
    } catch (Exception e) {
        throw ZeidonException.wrapException(e);
    }
    //:szWriteBuffer = szLeadingBlanks + "      </fo:block>"
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "      </fo:block>", 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
    try {
        {
            ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
            m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
            // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
        }
        ;
    } catch (Exception e) {
        throw ZeidonException.wrapException(e);
    }

    //:szWriteBuffer = szLeadingBlanks + "   </xsl:for-each>"
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "   </xsl:for-each>", 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
    try {
        {
            ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
            m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
            // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
        }
        ;
    } catch (Exception e) {
        throw ZeidonException.wrapException(e);
    }

    //:szWriteBuffer = szLeadingBlanks + "</fo:block-container>"
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "</fo:block-container>", 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
    try {
        {
            ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
            m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
            // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
        }
        ;
    } catch (Exception e) {
        throw ZeidonException.wrapException(e);
    }

    //:// Generate column 2 Block.
    //:mSPLDef2.LLD_Block.Left = mSPLDef2.LLD_Block.Left + ColumnWidth
    {
        MutableDouble md_dTempDecimal_2 = new MutableDouble(dTempDecimal_2);
        GetDecimalFromAttribute(md_dTempDecimal_2, mSPLDef2, "LLD_Block", "Left");
        dTempDecimal_2 = md_dTempDecimal_2.doubleValue();
    }
    dTempDecimal_3 = dTempDecimal_2 + ColumnWidth;
    SetAttributeFromDecimal(mSPLDef2, "LLD_Block", "Left", dTempDecimal_3);
    //:FormatBlockContainer( mSPLDef2, mSPLDef, lFile, szLeadingBlanks, szWriteBuffer, szColumnTop )
    omSPLDef_FormatBlockContainer(mSPLDef2, mSPLDef, lFile, szLeadingBlanks, szWriteBuffer, szColumnTop);

    //:szWriteBuffer = szLeadingBlanks + "   <xsl:for-each select=^SubregPhysicalLabelDef/" + szSectionName + "/DisplayUsageColumn2^>"
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "   <xsl:for-each select=^SubregPhysicalLabelDef/", 1, 0,
                32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, szSectionName, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "/DisplayUsageColumn2^>", 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
    try {
        {
            ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
            m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
            // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
        }
        ;
    } catch (Exception e) {
        throw ZeidonException.wrapException(e);
    }

    //:szWriteBuffer = szLeadingBlanks + "      <fo:block "
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "      <fo:block ", 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:AddFormatToSpecialText( mSPLDefPDF, "Column List", szWriteBuffer )
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        omSPLDef_AddFormatToSpecialText(mSPLDefPDF, "Column List", sb_szWriteBuffer);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
    try {
        {
            ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
            m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
            // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
        }
        ;
    } catch (Exception e) {
        throw ZeidonException.wrapException(e);
    }

    //:szWriteBuffer = szLeadingBlanks + "         <xsl:apply-templates select=^Name^/>"
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "         <xsl:apply-templates select=^Name^/>", 1, 0,
                32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
    try {
        {
            ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
            m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
            // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
        }
        ;
    } catch (Exception e) {
        throw ZeidonException.wrapException(e);
    }
    //:szWriteBuffer = szLeadingBlanks + "      </fo:block>"
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "      </fo:block>", 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
    try {
        {
            ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
            m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
            // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
        }
        ;
    } catch (Exception e) {
        throw ZeidonException.wrapException(e);
    }

    //:szWriteBuffer = szLeadingBlanks + "   </xsl:for-each>"
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "   </xsl:for-each>", 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
    try {
        {
            ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
            m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
            // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
        }
        ;
    } catch (Exception e) {
        throw ZeidonException.wrapException(e);
    }

    //:szWriteBuffer = szLeadingBlanks + "</fo:block-container>"
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    {
        StringBuilder sb_szWriteBuffer;
        if (szWriteBuffer == null)
            sb_szWriteBuffer = new StringBuilder(32);
        else
            sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
        ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "</fo:block-container>", 1, 0, 32001);
        szWriteBuffer = sb_szWriteBuffer.toString();
    }
    //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
    try {
        {
            ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
            m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
            // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
        }
        ;
    } catch (Exception e) {
        throw ZeidonException.wrapException(e);
    }

    //:// Generate column 3 Block.
    //:IF NumberColumns = 3
    if (NumberColumns == 3) {
        //:mSPLDef2.LLD_Block.Left = mSPLDef2.LLD_Block.Left + ColumnWidth
        {
            MutableDouble md_dTempDecimal_4 = new MutableDouble(dTempDecimal_4);
            GetDecimalFromAttribute(md_dTempDecimal_4, mSPLDef2, "LLD_Block", "Left");
            dTempDecimal_4 = md_dTempDecimal_4.doubleValue();
        }
        dTempDecimal_5 = dTempDecimal_4 + ColumnWidth;
        SetAttributeFromDecimal(mSPLDef2, "LLD_Block", "Left", dTempDecimal_5);
        //:FormatBlockContainer( mSPLDef2, mSPLDef, lFile, szLeadingBlanks, szWriteBuffer, szColumnTop )
        omSPLDef_FormatBlockContainer(mSPLDef2, mSPLDef, lFile, szLeadingBlanks, szWriteBuffer, szColumnTop);

        //:szWriteBuffer = szLeadingBlanks + "   <xsl:for-each select=^SubregPhysicalLabelDef/" + szSectionName + "/DisplayUsageColumn3^>"
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "   <xsl:for-each select=^SubregPhysicalLabelDef/", 1, 0,
                    32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringConcat(sb_szWriteBuffer, 1, 0, szSectionName, 1, 0, 32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "/DisplayUsageColumn3^>", 1, 0, 32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
        try {
            {
                ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
                m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
                // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
            }
            ;
        } catch (Exception e) {
            throw ZeidonException.wrapException(e);
        }

        //:szWriteBuffer = szLeadingBlanks + "      <fo:block "
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "      <fo:block ", 1, 0, 32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        //:AddFormatToSpecialText( mSPLDefPDF, "Column List", szWriteBuffer )
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            omSPLDef_AddFormatToSpecialText(mSPLDefPDF, "Column List", sb_szWriteBuffer);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
        try {
            {
                ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
                m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
                // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
            }
            ;
        } catch (Exception e) {
            throw ZeidonException.wrapException(e);
        }

        //:szWriteBuffer = szLeadingBlanks + "         <xsl:apply-templates select=^Name^/>"
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "         <xsl:apply-templates select=^Name^/>", 1, 0,
                    32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
        try {
            {
                ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
                m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
                // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
            }
            ;
        } catch (Exception e) {
            throw ZeidonException.wrapException(e);
        }
        //:szWriteBuffer = szLeadingBlanks + "      </fo:block>"
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "      </fo:block>", 1, 0, 32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
        try {
            {
                ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
                m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
                // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
            }
            ;
        } catch (Exception e) {
            throw ZeidonException.wrapException(e);
        }

        //:szWriteBuffer = szLeadingBlanks + "   </xsl:for-each>"
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "   </xsl:for-each>", 1, 0, 32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
        try {
            {
                ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
                m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
                // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
            }
            ;
        } catch (Exception e) {
            throw ZeidonException.wrapException(e);
        }

        //:szWriteBuffer = szLeadingBlanks + "</fo:block-container>"
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringCopy(sb_szWriteBuffer, 1, 0, szLeadingBlanks, 1, 0, 32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        {
            StringBuilder sb_szWriteBuffer;
            if (szWriteBuffer == null)
                sb_szWriteBuffer = new StringBuilder(32);
            else
                sb_szWriteBuffer = new StringBuilder(szWriteBuffer);
            ZeidonStringConcat(sb_szWriteBuffer, 1, 0, "</fo:block-container>", 1, 0, 32001);
            szWriteBuffer = sb_szWriteBuffer.toString();
        }
        //:WL_QC( mSPLDef, lFile, szWriteBuffer, "^", 0 )
        try {
            {
                ZGlobal1_Operation m_ZGlobal1_Operation = new ZGlobal1_Operation(mSPLDef);
                m_ZGlobal1_Operation.WL_QC(mSPLDef, lFile, szWriteBuffer, "^", 0);
                // m_ZGlobal1_Operation = null;  // permit gc  (unnecessary)
            }
            ;
        } catch (Exception e) {
            throw ZeidonException.wrapException(e);
        }
    }

    //:END

    //://DELETE ENTITY mSPLDef2.LLD_Block NONE
    //:DropObjectInstance( mSPLDef2 )
    DropObjectInstance(mSPLDef2);

    //:// Build the work object containing each Claim under the appropriate Classification.
    //:// Type: C - Claim;  S - Surface;  T - Application Type;  U - Area of Use.
    //:// ClaimsClassification: Bacteria; Protozoa; Viruses; Fungi.
    //:// First delete any existing entries.
    //:FOR EACH mSPLDef.SPLDI_ClaimsClassification 
    RESULT = SetCursorFirstEntity(mSPLDef, "SPLDI_ClaimsClassification", "");
    while (RESULT > zCURSOR_UNCHANGED) {
        //:DELETE ENTITY mSPLDef.SPLDI_ClaimsClassification NONE 
        RESULT = DeleteEntity(mSPLDef, "SPLDI_ClaimsClassification", zREPOS_NONE);
        RESULT = SetCursorNextEntity(mSPLDef, "SPLDI_ClaimsClassification", "");
    }

    //:END
    //:FOR EACH mSPLDef.SPLD_MarketingUsageOrdering WITHIN mSPLDef.SPLD_MarketingSection 
    //:          WHERE mSPLDef.SPLD_MarketingUsage.UsageType = "C" // just looking for Type=Claim
    RESULT = SetCursorFirstEntity(mSPLDef, "SPLD_MarketingUsageOrdering", "SPLD_MarketingSection");
    while (RESULT > zCURSOR_UNCHANGED) {
        if (CompareAttributeToString(mSPLDef, "SPLD_MarketingUsage", "UsageType", "C") == 0) {
            //:SET CURSOR FIRST mSPLDef.SPLDI_ClaimsClassification
            //:        WHERE mSPLDef.SPLDI_ClaimsClassification.ClaimsClassification = mSPLDef.SPLD_MarketingUsage.ClaimsClassification
            {
                StringBuilder sb_szTempString_0;
                if (szTempString_0 == null)
                    sb_szTempString_0 = new StringBuilder(32);
                else
                    sb_szTempString_0 = new StringBuilder(szTempString_0);
                GetStringFromAttribute(sb_szTempString_0, mSPLDef, "SPLD_MarketingUsage",
                        "ClaimsClassification");
                szTempString_0 = sb_szTempString_0.toString();
            }
            RESULT = SetCursorFirstEntityByString(mSPLDef, "SPLDI_ClaimsClassification", "ClaimsClassification",
                    szTempString_0, "");
            //:IF RESULT < zCURSOR_SET
            if (RESULT < zCURSOR_SET) {
                //:// Did not find the entity of the proper ClaimsClassification, so create one.
                //:CREATE ENTITY mSPLDef.SPLDI_ClaimsClassification
                RESULT = CreateEntity(mSPLDef, "SPLDI_ClaimsClassification", zPOS_AFTER);
                //:mSPLDef.SPLDI_ClaimsClassification.ClaimsClassification = mSPLDef.SPLD_MarketingUsage.ClaimsClassification
                SetAttributeFromAttribute(mSPLDef, "SPLDI_ClaimsClassification", "ClaimsClassification",
                        mSPLDef, "SPLD_MarketingUsage", "ClaimsClassification");
                //:INCLUDE mSPLDef.SPLDI_ClaimsUsage FROM mSPLDef.SPLD_MarketingUsage
                RESULT = IncludeSubobjectFromSubobject(mSPLDef, "SPLDI_ClaimsUsage", mSPLDef,
                        "SPLD_MarketingUsage", zPOS_AFTER);
                //:IF RESULT < 0
                if (RESULT < 0) {
                    //:TraceLineS( "GeneratePDF_ClmList Include SPLDI_ClaimsUsage FROM SPLD_MarketingUsage", " ======== CAN'T HAPPEN ===========================" )
                    TraceLineS("GeneratePDF_ClmList Include SPLDI_ClaimsUsage FROM SPLD_MarketingUsage",
                            " ======== CAN'T HAPPEN ===========================");
                    //:DisplayEntityInstance( mSPLDef, "SPLDI_ClaimsUsage" )
                    DisplayEntityInstance(mSPLDef, "SPLDI_ClaimsUsage");
                    //:DisplayEntityInstance( mSPLDef, "SPLD_MarketingUsage" )
                    DisplayEntityInstance(mSPLDef, "SPLD_MarketingUsage");
                    //:IssueError( mSPLDef, 0, 0, "Include Error" )
                    IssueError(mSPLDef, 0, 0, "Include Error");
                }

                //:END
                //:ELSE
            } else {
                //:// Check to see if the SPLD_MarketingUsage has already been included under the current ClaimsClassification.
                //:SET CURSOR FIRST mSPLDef.SPLDI_ClaimsUsage WHERE mSPLDef.SPLDI_ClaimsUsage.ID = mSPLDef.SPLD_MarketingUsage.ID
                {
                    MutableInt mi_lTempInteger_16 = new MutableInt(lTempInteger_16);
                    GetIntegerFromAttribute(mi_lTempInteger_16, mSPLDef, "SPLD_MarketingUsage", "ID");
                    lTempInteger_16 = mi_lTempInteger_16.intValue();
                }
                RESULT = SetCursorFirstEntityByInteger(mSPLDef, "SPLDI_ClaimsUsage", "ID", lTempInteger_16, "");
                //:IF RESULT < zCURSOR_SET
                if (RESULT < zCURSOR_SET) {
                    //:// Not already included so set cursor to the last included to include the entity at the end.
                    //:SET CURSOR LAST mSPLDef.SPLDI_ClaimsUsage
                    RESULT = SetCursorLastEntity(mSPLDef, "SPLDI_ClaimsUsage", "");
                    //:INCLUDE mSPLDef.SPLDI_ClaimsUsage FROM mSPLDef.SPLD_MarketingUsage
                    RESULT = IncludeSubobjectFromSubobject(mSPLDef, "SPLDI_ClaimsUsage", mSPLDef,
                            "SPLD_MarketingUsage", zPOS_AFTER);
                    //:IF RESULT < 0
                    if (RESULT < 0) {
                        //:TraceLineS( "GeneratePDF_ClmList Include SPLDI_ClaimsUsage FROM SPLD_MarketingUsage", " ===========CAN'T HAPPEN EITHER ========================" )
                        TraceLineS("GeneratePDF_ClmList Include SPLDI_ClaimsUsage FROM SPLD_MarketingUsage",
                                " ===========CAN'T HAPPEN EITHER ========================");
                        //:DisplayEntityInstance( mSPLDef, "SPLDI_ClaimsUsage" )
                        DisplayEntityInstance(mSPLDef, "SPLDI_ClaimsUsage");
                        //:DisplayEntityInstance( mSPLDef, "SPLD_MarketingUsage" )
                        DisplayEntityInstance(mSPLDef, "SPLD_MarketingUsage");
                        //:IssueError( mSPLDef, 0, 0, "Include Error" )
                        IssueError(mSPLDef, 0, 0, "Include Error");
                    }

                    //:END
                    //:ELSE
                } else {
                    //:TraceLineS( "GeneratePDF_ClmList Include SPLDI_ClaimsUsage FROM SPLD_MarketingUsage", " ====== ALREADY INCLUDED ... COULD HAPPEN =============================" )
                    TraceLineS("GeneratePDF_ClmList Include SPLDI_ClaimsUsage FROM SPLD_MarketingUsage",
                            " ====== ALREADY INCLUDED ... COULD HAPPEN =============================");
                    //:// DisplayEntityInstance( mSPLDef, "SPLDI_ClaimsUsage" )
                    //:DisplayEntityInstance( mSPLDef, "SPLD_MarketingUsage" )
                    DisplayEntityInstance(mSPLDef, "SPLD_MarketingUsage");
                }

                //:END
            }

        }

        RESULT = SetCursorNextEntity(mSPLDef, "SPLD_MarketingUsageOrdering", "SPLD_MarketingSection");
        //:END
    }

    //:END

    //:// Reset LLD_SpecialSectionAttrBlock.MarginTop back to its original value.
    //:mSPLDefPDF.LLD_SpecialSectionAttrBlock.MarginTop = OriginalTopMargin
    SetAttributeFromDecimal(mSPLDefPDF, "LLD_SpecialSectionAttrBlock", "MarginTop", OriginalTopMargin);
    return (0);
    //    
    // END
}

From source file:com.arksoft.epamms.wMLC_Dialog.java

public int ValidateIngredientsSect(View ViewToWindow) {
    zVIEW wWebXfer = new zVIEW();
    int RESULT = 0;
    //:VIEW mMasLC   REGISTERED AS mMasLC
    zVIEW mMasLC = new zVIEW();
    //:VIEW mTempLC  BASED ON LOD  mMasLC
    zVIEW mTempLC = new zVIEW();
    //:STRING ( 256  ) szMessage
    String szMessage = null;//w w  w.ja  v  a2s  .c  om
    //:// STRING (  50  ) szSectionTitle
    //:STRING (  32  ) szPercent
    String szPercent = null;
    //:// INTEGER lSectionTitleLth
    //:DECIMAL dPercent
    double dPercent = 0.0;
    //:SHORT   nRC
    int nRC = 0;
    double dTempDecimal_0 = 0.0;
    int lTempInteger_0 = 0;

    RESULT = GetViewByName(wWebXfer, "wWebXfer", ViewToWindow, zLEVEL_TASK);
    RESULT = GetViewByName(mMasLC, "mMasLC", ViewToWindow, zLEVEL_TASK);

    //:// Ensure section title is not blank.
    //:// szSectionTitle = mMasLC.M_GeneralSection.Title
    //:// lSectionTitleLth = zGetStringLen( szSectionTitle )
    //:// TraceLineS( "Product Section Title: ", szSectionTitle )
    //:// TraceLineI( "Product Section Title Length: ", lSectionTitleLth )
    //:// IF lSectionTitleLth < 1
    //://
    //://    MessageSend( ViewToWindow, "", "Ingredients Section",
    //://                 "The Master Product Section Name cannot be blank.",
    //://                 zMSGQ_OBJECT_CONSTRAINT_ERROR, 0 )
    //://    SetWindowActionBehavior( ViewToWindow, zWAB_StayOnWindow, "", "" )
    //://    RETURN 2
    //://
    //:// END

    //:CreateViewFromView( mTempLC, mMasLC )
    CreateViewFromView(mTempLC, mMasLC);
    //:dPercent = mTempLC.M_IngredientsSection.GeneralInactivePercent
    {
        MutableDouble md_dPercent = new MutableDouble(dPercent);
        GetDecimalFromAttribute(md_dPercent, mTempLC, "M_IngredientsSection", "GeneralInactivePercent");
        dPercent = md_dPercent.doubleValue();
    }
    //:FOR EACH mTempLC.M_IngredientsStatement
    RESULT = SetCursorFirstEntity(mTempLC, "M_IngredientsStatement", "");
    while (RESULT > zCURSOR_UNCHANGED) {
        //:dPercent = dPercent + mTempLC.M_IngredientsStatement.Percent
        {
            MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
            GetDecimalFromAttribute(md_dTempDecimal_0, mTempLC, "M_IngredientsStatement", "Percent");
            dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
        }
        dPercent = dPercent + dTempDecimal_0;
        RESULT = SetCursorNextEntity(mTempLC, "M_IngredientsStatement", "");
    }

    //:END

    //:DropView( mTempLC )
    DropView(mTempLC);
    //:IF dPercent != 100.000
    if (dPercent != 100.000) {

        //:wWebXfer.Root.Decimal3 = dPercent
        SetAttributeFromDecimal(wWebXfer, "Root", "Decimal3", dPercent);
        //:szPercent = wWebXfer.Root.Decimal3
        {
            MutableInt mi_lTempInteger_0 = new MutableInt(lTempInteger_0);
            StringBuilder sb_szPercent;
            if (szPercent == null)
                sb_szPercent = new StringBuilder(32);
            else
                sb_szPercent = new StringBuilder(szPercent);
            GetVariableFromAttribute(sb_szPercent, mi_lTempInteger_0, 'S', 33, wWebXfer, "Root", "Decimal3", "",
                    0);
            lTempInteger_0 = mi_lTempInteger_0.intValue();
            szPercent = sb_szPercent.toString();
        }
        //:szMessage = "The Ingredients total percentage must add up to 100% - currently: "
        {
            StringBuilder sb_szMessage;
            if (szMessage == null)
                sb_szMessage = new StringBuilder(32);
            else
                sb_szMessage = new StringBuilder(szMessage);
            ZeidonStringCopy(sb_szMessage, 1, 0,
                    "The Ingredients total percentage must add up to 100% - currently: ", 1, 0, 257);
            szMessage = sb_szMessage.toString();
        }
        //:szMessage = szMessage + szPercent
        {
            StringBuilder sb_szMessage;
            if (szMessage == null)
                sb_szMessage = new StringBuilder(32);
            else
                sb_szMessage = new StringBuilder(szMessage);
            ZeidonStringConcat(sb_szMessage, 1, 0, szPercent, 1, 0, 257);
            szMessage = sb_szMessage.toString();
        }
        //:MessageSend( ViewToWindow, "", "Ingredients Section",
        //:             szMessage,
        //:             zMSGQ_OBJECT_CONSTRAINT_ERROR, 0 )
        MessageSend(ViewToWindow, "", "Ingredients Section", szMessage, zMSGQ_OBJECT_CONSTRAINT_ERROR, 0);
        //:SetWindowActionBehavior( ViewToWindow, zWAB_StayOnWindow, "", "" )
        m_ZDRVROPR.SetWindowActionBehavior(ViewToWindow, zWAB_StayOnWindow, "", "");
        //:RETURN 2
        if (8 == 8)
            return (2);
    }

    //:END
    return (0);
    // END
}

From source file:com.quinsoft.zencas.mStudenC_Object.java

public int omStudenC_dAnticipatedClassif(View mStudenC, String InternalEntityStructure,
        String InternalAttribStructure, Integer GetOrSetFlag) {
    zVIEW sHost = new zVIEW();
    //:VIEW lTrnscpt BASED ON LOD  lTrnscpt
    zVIEW lTrnscpt = new zVIEW();
    //:VIEW lClsLstC BASED ON LOD  lClsLstC
    zVIEW lClsLstC = new zVIEW();
    //:STRING ( 2 )   szClassification
    String szClassification = null;
    //:STRING ( 1 )   szCollegeType
    String szCollegeType = null;/*from  www  .j a v a 2s  .com*/
    //:STRING ( 20 )  szCollegeYearSemester
    String szCollegeYearSemester = null;
    //:STRING ( 20 )  szCurrentCollegeYearSemester
    String szCurrentCollegeYearSemester = null;
    //:STRING ( 20 )  szTranscriptCollegeYearSemester
    String szTranscriptCollegeYearSemester = null;
    //:STRING ( 1 )   szStatus
    String szStatus = null;
    //:STRING ( 1 )   szErrorFlag
    String szErrorFlag = null;
    //:DECIMAL        dTotalCredits
    double dTotalCredits = 0.0;
    int RESULT = 0;
    int lTempInteger_0 = 0;
    int lTempInteger_1 = 0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF   zDERIVED_GET:
    case zDERIVED_GET:

        //:// It's an error if either view lClsLstC or sHost does not exist.
        //:GET VIEW lClsLstC NAMED "lClsLstC"
        RESULT = GetViewByName(lClsLstC, "lClsLstC", mStudenC, zLEVEL_TASK);
        //:IF RESULT < 0
        if (RESULT < 0) {
            //:GET VIEW lClsLstC NAMED "TermslClsLstC"
            RESULT = GetViewByName(lClsLstC, "TermslClsLstC", mStudenC, zLEVEL_TASK);
            //:IF RESULT < 0
            if (RESULT < 0) {
                //:szErrorFlag = "Y"
                {
                    StringBuilder sb_szErrorFlag;
                    if (szErrorFlag == null)
                        sb_szErrorFlag = new StringBuilder(32);
                    else
                        sb_szErrorFlag = new StringBuilder(szErrorFlag);
                    ZeidonStringCopy(sb_szErrorFlag, 1, 0, "Y", 1, 0, 2);
                    szErrorFlag = sb_szErrorFlag.toString();
                }
            }

            //:END
        }

        //:END
        //:GET VIEW sHost NAMED "sHost"
        RESULT = GetViewByName(sHost, "sHost", mStudenC, zLEVEL_TASK);
        //:IF sHost.HostStudentClassificationData DOES NOT EXIST
        lTempInteger_0 = CheckExistenceOfEntity(sHost, "HostStudentClassificationData");
        if (lTempInteger_0 != 0) {
            //:szErrorFlag = "Y"
            {
                StringBuilder sb_szErrorFlag;
                if (szErrorFlag == null)
                    sb_szErrorFlag = new StringBuilder(32);
                else
                    sb_szErrorFlag = new StringBuilder(szErrorFlag);
                ZeidonStringCopy(sb_szErrorFlag, 1, 0, "Y", 1, 0, 2);
                szErrorFlag = sb_szErrorFlag.toString();
            }
        }

        //:END

        //:// Determine the anticipated Student Classification (ie., Student Academic Level) for the
        //:// CollegeTerm from the Class in the lClsLstC.
        //:// We will get the total accumulated credits from the lTranscpt object for the College Term. If we get them once,
        //:// we will store them in mStudenC.UpdateSchedule so we don't retrieve it multiple times.

        //:IF szErrorFlag = ""
        if (ZeidonStringCompare(szErrorFlag, 1, 0, "", 1, 0, 2) == 0) {
            //:OrderEntityForView( sHost, "HostStudentClassificationData", "MinCreditsForClassification A" )
            OrderEntityForView(sHost, "HostStudentClassificationData", "MinCreditsForClassification A");

            //:// Accumulate credits only if we didn't do it before.
            //:dTotalCredits = mStudenC.UpdateSchedule.dAnticipatedAccumulatedCredits 
            {
                MutableDouble md_dTotalCredits = new MutableDouble(dTotalCredits);
                GetDecimalFromAttribute(md_dTotalCredits, mStudenC, "UpdateSchedule",
                        "dAnticipatedAccumulatedCredits");
                dTotalCredits = md_dTotalCredits.doubleValue();
            }

            //:// Use accumulated credits and min credits per classification from sHost to determine Classification.
            //:SET CURSOR LAST sHost.HostStudentClassificationData WHERE sHost.HostStudentClassificationData.MinCreditsForClassification <= dTotalCredits
            RESULT = SetCursorLastEntity(sHost, "HostStudentClassificationData", "");
            if (RESULT > zCURSOR_UNCHANGED) {
                while (RESULT > zCURSOR_UNCHANGED && (CompareAttributeToDecimal(sHost,
                        "HostStudentClassificationData", "MinCreditsForClassification", dTotalCredits) > 0)) {
                    RESULT = SetCursorPrevEntity(sHost, "HostStudentClassificationData", "");
                }

            }

            //:szClassification = sHost.HostStudentClassificationData.StudentClassification
            {
                MutableInt mi_lTempInteger_1 = new MutableInt(lTempInteger_1);
                StringBuilder sb_szClassification;
                if (szClassification == null)
                    sb_szClassification = new StringBuilder(32);
                else
                    sb_szClassification = new StringBuilder(szClassification);
                GetVariableFromAttribute(sb_szClassification, mi_lTempInteger_1, 'S', 3, sHost,
                        "HostStudentClassificationData", "StudentClassification", "", 0);
                lTempInteger_1 = mi_lTempInteger_1.intValue();
                szClassification = sb_szClassification.toString();
            }
            //:ELSE
        } else {
            //:szClassification = ""
            {
                StringBuilder sb_szClassification;
                if (szClassification == null)
                    sb_szClassification = new StringBuilder(32);
                else
                    sb_szClassification = new StringBuilder(szClassification);
                ZeidonStringCopy(sb_szClassification, 1, 0, "", 1, 0, 3);
                szClassification = sb_szClassification.toString();
            }
        }

        //:END

        //:// Store the calculated value in the object.
        //:StoreStringInRecord ( mStudenC,
        //:                   InternalEntityStructure, InternalAttribStructure, szClassification )
        StoreStringInRecord(mStudenC, InternalEntityStructure, InternalAttribStructure, szClassification);
        break;

    //:  /* end zDERIVED_GET */
    //:OF   zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:     /* end zDERIVED_SET */
    //:END  /* case */
    return (0);
    // END
}

From source file:com.quinsoft.swauopencuas.mSAProf_Object.java

public int omSAProf_dTermBalance(View mSAProf, String InternalEntityStructure, String InternalAttribStructure,
        Integer GetOrSetFlag) {/*ww  w. j  a  va  2s. c o m*/
    zVIEW mSAProf2 = new zVIEW();
    //:VIEW  mSAProfB BASED ON LOD mSAProfB
    zVIEW mSAProfB = new zVIEW();
    //:DECIMAL       dBeginningTermBalance 
    double dBeginningTermBalance = 0.0;
    //:DECIMAL       dEndingTermBalance
    double dEndingTermBalance = 0.0;
    //:DECIMAL       dTotalForPeriod
    double dTotalForPeriod = 0.0;
    //:STRING ( 8 )  szEndingPeriodDate
    String szEndingPeriodDate = null;
    //:STRING ( 8 )  szTransactionDate
    String szTransactionDate = null;
    //:STRING ( 8 )  szTermBeginDate
    String szTermBeginDate = null;
    //:STRING ( 8 )  szTermEndDate
    String szTermEndDate = null;
    //:STRING ( 50 ) szTemp
    String szTemp = null;
    int lTempInteger_0 = 0;
    int lTempInteger_1 = 0;
    zVIEW vTempViewVar_0 = new zVIEW();
    int RESULT = 0;
    int lTempInteger_2 = 0;
    int lTempInteger_3 = 0;
    int lTempInteger_4 = 0;
    int lTempInteger_5 = 0;
    int lTempInteger_6 = 0;
    double dTempDecimal_0 = 0.0;
    int lTempInteger_7 = 0;
    double dTempDecimal_1 = 0.0;
    double dTempDecimal_2 = 0.0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF zDERIVED_GET:
    case zDERIVED_GET:
        //://TraceLineS("*** dTermBalance derived attribute *** ", "")

        //:// Account Balance at Beginning of the Billing Period.
        //:// Total all SA Transactions with Transaction Dates earlier than the end of this Period and then
        //:// subtract out SA Transactions for the Period to get the balance at the beginning of the Period.
        //:// We do this rather than just total SA Transactions prior to the beginning of the Period because there
        //:// are sometimes transactions, like Refunds, that come in during the Period but aren't tied to the 
        //:// Period, as they represent earlier activity, and won't be included in charges/payments for the Period.

        //:// This derived attribute will only work when all the transactions under the Billing Period exist.  
        //:IF mSAProf.BillingPeriod.wTermBalance != ""
        if (CompareAttributeToString(mSAProf, "BillingPeriod", "wTermBalance", "") != 0) {
            //:// We don't want to reactivate mSAProfB if we've already computed the balance.
            //:dBeginningTermBalance = mSAProf.BillingPeriod.wTermBalance 
            {
                MutableDouble md_dBeginningTermBalance = new MutableDouble(dBeginningTermBalance);
                GetDecimalFromAttribute(md_dBeginningTermBalance, mSAProf, "BillingPeriod", "wTermBalance");
                dBeginningTermBalance = md_dBeginningTermBalance.doubleValue();
            }
            //:szTemp = dBeginningTermBalance
            {
                StringBuilder sb_szTemp;
                if (szTemp == null)
                    sb_szTemp = new StringBuilder(32);
                else
                    sb_szTemp = new StringBuilder(szTemp);
                ZeidonStringConvertFromNumber(sb_szTemp, 1, 0, 50, 0, dBeginningTermBalance, "D");
                szTemp = sb_szTemp.toString();
            }
            //:TraceLineS("**** wTermBalance has value *** ", szTemp)
            TraceLineS("**** wTermBalance has value *** ", szTemp);
            //:ELSE
        } else {

            //:// Total all SA Transactions that go with this Period or an earlier Period.
            //:szEndingPeriodDate = mSAProf.BillingPeriod.EndDate 
            {
                MutableInt mi_lTempInteger_0 = new MutableInt(lTempInteger_0);
                StringBuilder sb_szEndingPeriodDate;
                if (szEndingPeriodDate == null)
                    sb_szEndingPeriodDate = new StringBuilder(32);
                else
                    sb_szEndingPeriodDate = new StringBuilder(szEndingPeriodDate);
                GetVariableFromAttribute(sb_szEndingPeriodDate, mi_lTempInteger_0, 'S', 9, mSAProf,
                        "BillingPeriod", "EndDate", "", 0);
                lTempInteger_0 = mi_lTempInteger_0.intValue();
                szEndingPeriodDate = sb_szEndingPeriodDate.toString();
            }
            //:TraceLineS("**** szEndingPeriodDate *** ", szEndingPeriodDate)
            TraceLineS("**** szEndingPeriodDate *** ", szEndingPeriodDate);
            //:ACTIVATE mSAProfB WHERE mSAProfB.StudentAccountProfile.ID = mSAProf.StudentAccountProfile.ID 
            {
                MutableInt mi_lTempInteger_1 = new MutableInt(lTempInteger_1);
                GetIntegerFromAttribute(mi_lTempInteger_1, mSAProf, "StudentAccountProfile", "ID");
                lTempInteger_1 = mi_lTempInteger_1.intValue();
            }
            omSAProf_fnLocalBuildQual_21(mSAProf, vTempViewVar_0, lTempInteger_1);
            RESULT = ActivateObjectInstance(mSAProfB, "mSAProfB", mSAProf, vTempViewVar_0, zSINGLE);
            DropView(vTempViewVar_0);
            //:IF RESULT >= 0  
            if (RESULT >= 0) {
                //:// Don't include SA Transactions later than the end of the selected term. We will take the Transaction Date as the
                //:// Begin Date for the Billing Period tied to the SA Transaction.
                //:// If there is no Billing Period tied to the SA Transaction, then don't include the Transaction if its Trans Date is later than
                //:// the end of the selected Term.
                //:szTermBeginDate = mSAProf.BillingPeriod.BeginDate 
                {
                    MutableInt mi_lTempInteger_2 = new MutableInt(lTempInteger_2);
                    StringBuilder sb_szTermBeginDate;
                    if (szTermBeginDate == null)
                        sb_szTermBeginDate = new StringBuilder(32);
                    else
                        sb_szTermBeginDate = new StringBuilder(szTermBeginDate);
                    GetVariableFromAttribute(sb_szTermBeginDate, mi_lTempInteger_2, 'S', 9, mSAProf,
                            "BillingPeriod", "BeginDate", "", 0);
                    lTempInteger_2 = mi_lTempInteger_2.intValue();
                    szTermBeginDate = sb_szTermBeginDate.toString();
                }
                //:szTermEndDate   = mSAProf.BillingPeriod.EndDate 
                {
                    MutableInt mi_lTempInteger_3 = new MutableInt(lTempInteger_3);
                    StringBuilder sb_szTermEndDate;
                    if (szTermEndDate == null)
                        sb_szTermEndDate = new StringBuilder(32);
                    else
                        sb_szTermEndDate = new StringBuilder(szTermEndDate);
                    GetVariableFromAttribute(sb_szTermEndDate, mi_lTempInteger_3, 'S', 9, mSAProf,
                            "BillingPeriod", "EndDate", "", 0);
                    lTempInteger_3 = mi_lTempInteger_3.intValue();
                    szTermEndDate = sb_szTermEndDate.toString();
                }
                //:FOR EACH mSAProfB.StudentAccountTransApplied 
                RESULT = SetCursorFirstEntity(mSAProfB, "StudentAccountTransApplied", "");
                while (RESULT > zCURSOR_UNCHANGED) {
                    //:IF mSAProfB.BillingPeriod EXISTS AND mSAProf.BillingPeriod EXISTS
                    lTempInteger_4 = CheckExistenceOfEntity(mSAProfB, "BillingPeriod");
                    lTempInteger_5 = CheckExistenceOfEntity(mSAProf, "BillingPeriod");
                    if (lTempInteger_4 == 0 && lTempInteger_5 == 0) {
                        //:szTransactionDate = mSAProfB.BillingPeriod.BeginDate 
                        {
                            MutableInt mi_lTempInteger_6 = new MutableInt(lTempInteger_6);
                            StringBuilder sb_szTransactionDate;
                            if (szTransactionDate == null)
                                sb_szTransactionDate = new StringBuilder(32);
                            else
                                sb_szTransactionDate = new StringBuilder(szTransactionDate);
                            GetVariableFromAttribute(sb_szTransactionDate, mi_lTempInteger_6, 'S', 9, mSAProfB,
                                    "BillingPeriod", "BeginDate", "", 0);
                            lTempInteger_6 = mi_lTempInteger_6.intValue();
                            szTransactionDate = sb_szTransactionDate.toString();
                        }
                        //:IF szTransactionDate <= szTermEndDate
                        if (ZeidonStringCompare(szTransactionDate, 1, 0, szTermEndDate, 1, 0, 9) >= 0) {
                            //:dEndingTermBalance = dEndingTermBalance + mSAProfB.StudentAccountTransApplied.Amount 
                            {
                                MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                                GetDecimalFromAttribute(md_dTempDecimal_0, mSAProfB,
                                        "StudentAccountTransApplied", "Amount");
                                dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
                            }
                            dEndingTermBalance = dEndingTermBalance + dTempDecimal_0;
                        }

                        //:END
                        //:ELSE
                    } else {
                        //:szTransactionDate = mSAProfB.StudentAccountTransApplied.TransactionDate 
                        {
                            MutableInt mi_lTempInteger_7 = new MutableInt(lTempInteger_7);
                            StringBuilder sb_szTransactionDate;
                            if (szTransactionDate == null)
                                sb_szTransactionDate = new StringBuilder(32);
                            else
                                sb_szTransactionDate = new StringBuilder(szTransactionDate);
                            GetVariableFromAttribute(sb_szTransactionDate, mi_lTempInteger_7, 'S', 9, mSAProfB,
                                    "StudentAccountTransApplied", "TransactionDate", "", 0);
                            lTempInteger_7 = mi_lTempInteger_7.intValue();
                            szTransactionDate = sb_szTransactionDate.toString();
                        }
                        //:IF szTransactionDate <= szTermEndDate
                        if (ZeidonStringCompare(szTransactionDate, 1, 0, szTermEndDate, 1, 0, 9) >= 0) {
                            //:dEndingTermBalance = dEndingTermBalance + mSAProfB.StudentAccountTransApplied.Amount 
                            {
                                MutableDouble md_dTempDecimal_1 = new MutableDouble(dTempDecimal_1);
                                GetDecimalFromAttribute(md_dTempDecimal_1, mSAProfB,
                                        "StudentAccountTransApplied", "Amount");
                                dTempDecimal_1 = md_dTempDecimal_1.doubleValue();
                            }
                            dEndingTermBalance = dEndingTermBalance + dTempDecimal_1;
                        }

                        //:END
                    }

                    RESULT = SetCursorNextEntity(mSAProfB, "StudentAccountTransApplied", "");
                    //:END
                }

                //:END
            }

            //:// The following code was replaced with the above by DonC on 5/7/2013 to handle the Insurance Charge that was 
            //:// charged to the next Fall Term, but had a TransactionDate that fell within the Start/End dates of the Summer Term.
            //:/*dEndingTermBalance = mSAProfB.StudentAccountProfile.BalanceForward 
            //://szTemp = dEndingTermBalance
            //://TraceLineS("**** dEndingTermBalance *** ", szTemp)
            //:FOR EACH mSAProfB.StudentAccountTransApplied  
            //:   IF mSAProfB.StudentAccountTransApplied.TransactionDate <= szEndingPeriodDate 
            //:      dEndingTermBalance = dEndingTermBalance + mSAProfB.StudentAccountTransApplied.Amount 
            //:   END
            //:END */
            //:END
            //:DropObjectInstance( mSAProfB )
            DropObjectInstance(mSAProfB);
            //://szTemp = dEndingTermBalance
            //://TraceLineS("**** dEndingTermBalance after StudentAccountTransApplied *** ", szTemp)

            //:// Subtract out transaction amounts for current Period.
            //:CreateViewFromView( mSAProf2, mSAProf )
            CreateViewFromView(mSAProf2, mSAProf);
            //:dTotalForPeriod = 0
            dTotalForPeriod = 0;
            //:FOR EACH mSAProf2.PeriodTransApplied  
            RESULT = SetCursorFirstEntity(mSAProf2, "PeriodTransApplied", "");
            while (RESULT > zCURSOR_UNCHANGED) {
                //:dTotalForPeriod = dTotalForPeriod + mSAProf2.PeriodTransApplied.Amount 
                {
                    MutableDouble md_dTempDecimal_2 = new MutableDouble(dTempDecimal_2);
                    GetDecimalFromAttribute(md_dTempDecimal_2, mSAProf2, "PeriodTransApplied", "Amount");
                    dTempDecimal_2 = md_dTempDecimal_2.doubleValue();
                }
                dTotalForPeriod = dTotalForPeriod + dTempDecimal_2;
                RESULT = SetCursorNextEntity(mSAProf2, "PeriodTransApplied", "");
            }

            //:END 
            //:DropView( mSAProf2 )
            DropView(mSAProf2);
            //://szTemp = dTotalForPeriod
            //://TraceLineS("**** dTotalForPeriod  *** ", szTemp)

            //:// The amount for the term is the balance at end of term minus any charges/credits for the current term.
            //:dBeginningTermBalance = dEndingTermBalance - dTotalForPeriod
            dBeginningTermBalance = dEndingTermBalance - dTotalForPeriod;
        }

        //://szTemp = dBeginningTermBalance
        //://TraceLineS("**** dEndingTermBalance after dTotalForPeriod *** ", szTemp)

        //:END

        //:StoreValueInRecord( mSAProf, InternalEntityStructure, 
        //:                 InternalAttribStructure, dBeginningTermBalance, 0 )
        StoreValueInRecord(mSAProf, InternalEntityStructure, InternalAttribStructure, dBeginningTermBalance, 0);
        break;
    //:   
    //:   /* end zDERIVED_GET */

    //:OF zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:   /* end zDERIVED_SET */
    //:END   /* case */
    return (0);
    // END
}