Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] My totals field shows only asterisks [SOLVED]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] My totals field shows only asterisks [SOLVED]
 Login/Join
 
Guru
posted
I've got a FEX that has some fields that are codes as P08; when I total theese fields, they show, on the totals line, as nothing but asterisks. I increased the size of the fields from P08 to P14 and they still show as asterisks. I also hand-totalled the fields and the fields calculated have 10 numbers; shouldn't a field of P14 take care of this? These are monetary fields, with no decimals - I am only interested in dollar amounts and am not concerned with the data beyond the dollars.

I only have three fileds in my report, so I have plenty of room to "play" with.

Can anybody suggest what I might be doing wrong? Thank you,

This message has been edited. Last edited by: webmeister,


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Expert
posted Hide Post
Are you including commas in your position count? A number such as one billion - 1,000,000,000 is only ten numerics but will require a field size of 13. Don't forget also to include decimal points etc. etc. etc. All info available in the manuals.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Guru
posted Hide Post
Hi, Tony,

And thanks for replying. No, I'm not using commas or decimals of any kind; the report I'm trying to create utilizes only whole dollar amounts, which is why I'm a bit confused. And I did look in the manuals we have in the section about various formats. The individual amounts (i.e., the detail portion of my report) shows amounts using up to 8 postions, and those show up fine; on the summary totals, however, I get only asterisks, which is why I made a couple of new fields called TOT_PAID, with a width of 14, but still only see asterisks.

If you have other ideas, I'd love to hear.

Thanks!


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Guru
posted Hide Post
Could you please show the code ?

Thanks

Bob


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Virtuoso
posted Hide Post
WebMeister,

Commas are not counted in the width of a field.

You say that you hand-totalled the fields, that means that when you display them using PRINT you can see each value.

What happens if you use SUM? Also *****?

In any case, the code could be useful.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
quote:
Commas are not counted in the width of a field.
Quite correct Danny, but I wonder how many folks actually went and checked their manual? If only a couple did then my ruse worked Wink

WM, Try building an example using one of the sample databases (maybe GGSALES).

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
quote:

Commas are not counted in the width of a field.

Tony, you counting the commas? IMPOSSIBLE! Big Grin
I suspected it was a ruse... Wink


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Master
posted Hide Post
A P8 can hold a 15 digit number. What happens if you change your usage to P16?


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Guru
posted Hide Post
OK.... for those asking to see the code, here it is. The first snippet is that portion of the Master File I am using, and the second pice is the actual code. The program:

 FILE=SWFILE  ,SUFFIX=VSAM                                                     ,$
SEGNAME=ROOT    ,SEGTYPE=S0                                                   ,$
 GROUP=ROOT_KEY  , ALIAS=KEY ,A18 ,A18                                        ,$
TITLE='Disb9,Ern/Pd'  ,$
  FIELD=DISB_OVRD_11        ,SW337      ,A01     ,A01  ,TITLE='Disb,Ovrd11'   ,$
  FIELD=DISB_OVRD_12        ,SW338      ,A01     ,A01  ,TITLE='Disb,Ovrd12'   ,$
SEGNAME=GROUP_04,SEGTYPE=S0 ,PARENT=ROOT    ,
        OCCURS=012,POSITION=SW119           ,$
 FIELD=DISB_IDENT ,SW121       ,A05    ,A05 ,$
 FIELD=DISB_OFFER ,SW122       ,P09.2C ,P04 ,$
 FIELD=DISB_ACCPT ,SW123       ,P09.2C ,P04 ,$
 FIELD=DISB_EARN  ,SW124       ,P09.2C ,P04 ,$
 FIELD=DISB_PRT   ,SW126       ,P09.2C ,P04 ,$
 FIELD=DISB_REASON,SW127       ,A01    ,A01 ,$
SEGNAME=GROUP_02,SEGTYPE=S0 ,PARENT=SW020SG ,OCCURS=001                 ,
      POSITION=SW415                                                          ,$


The program:
 EX DYNALLOC DD=AAFILE,DSN=SAC.AAFILE
EX DYNALLOC DD=ADFILE,DSN=SAC.ADFILE
EX DYNALLOC DD=AIFILE,DSN=SAC.AIFILE
EX DYNALLOC DD=RAFILE,DSN=SAC.RAFILE
EX DYNALLOC DD=RBFILE,DSN=SAC.RBFILE
EX DYNALLOC DD=RTFILE,DSN=SAC.RTFILE
EX DYNALLOC DD=SAFILE,DSN=SAC.SAFILE
EX DYNALLOC DD=SWFILE,DSN=SAC.SWFILE
-*===============================================================
-*=================   PROCESSING SWFILE  ========================
-*===============================================================
-*
JOIN CLEAR *
-*
DEFINE FILE SWFILE
NKEY         /A5  = SW_FUND;
FALLAWD      /P04 = IF (SW121 EQ '&DISBID1') THEN SW123 ELSE 0;
SPRAWD       /P04 = IF (SW121 EQ '&DISBID2') THEN SW123 ELSE 0;
SSIAWD       /P04 = IF (SW121 EQ '&DISBID3') THEN SW123 ELSE 0;
SSIIAWD      /P04 = IF (SW121 EQ '&DISBID4') THEN SW123 ELSE 0;
FALLERND     /P04 = IF (SW121 EQ '&DISBID1') THEN SW124 ELSE 0;
SPRERND      /P04 = IF (SW121 EQ '&DISBID2') THEN SW124 ELSE 0;
SSIERND      /P04 = IF (SW121 EQ '&DISBID3') THEN SW124 ELSE 0;
SSIIERND     /P04 = IF (SW121 EQ '&DISBID4') THEN SW124 ELSE 0;
END
-*
TABLE FILE SWFILE
-*
WRITE
-*
      SW123        AS TOT_AWD
      SW124        AS TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
-*
BY    STU_ID
BY    SW_FUND
-*
WHERE AWD_YR       EQ '&AWDYR' AND AWD_PER_ID NE ' ';
WHERE SW123        GT 0
OR    SW124        GT 0
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS    S059ASAC
-*
END
-RUN
-*
-IF     &RECORDS       EQ  0    GOTO QQ;
-*
-*===============================================================
-*=================   PROCESSING SAFILE  ========================
-*===============================================================
-*
DEFINE FILE SAFILE
SAKEY        /A13 = ROOT_KEY;
END
-*
TABLE FILE SAFILE
-*
WRITE
-*
      STU_ID
      SA084        AS SA084
      SA2C4        AS EFC
      PK_RAP_CODE  AS RAP
      AWD_YR
-*
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
WHERE AWD_YR       EQ '&AWDYR'
-*
ON    TABLE        HOLD  AS    S059BSAC
-*
END
-RUN
-*
-IF     &RECORDS       EQ  0    GOTO QQ;
-*
-*
-*===============================================================
-*=================   PROCESSING RTFILE  ========================
-*===============================================================
-*
TABLE FILE RTFILE
-*
WRITE
-*
      RT020        AS RT020
      RT115        AS DEGREE
      RT120        AS RT120
-*
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
-IF   &TYPETERM    EQ 'ONE'  GOTO    SELONE     ELSE   GOTO   SEL4;
-*
-SELONE
-*
WHERE TERM         EQ '&TERM1'
-GOTO ENDC
-*
-SEL4
-*
WHERE TERM         EQ '&TERM1' OR '&TERM2' OR '&TERM3' OR '&TERM4'
-*
-ENDC
-*
ON    TABLE        HOLD AS     S059CSAC
-*
END
-RUN
-*
SET  ALL    = PASS
JOIN CLEAR *
JOIN STU_ID IN S059ASAC TO STU_ID   IN AAFILE       AS SATOAA
JOIN STU_ID IN S059ASAC TO STU_ID   IN S059BSAC     AS SASW
JOIN STU_ID IN S059ASAC TO STU_ID   IN S059CSAC     AS SART
-*
TABLE FILE S059ASAC
-*
WRITE
-*
      SW_FUND
      TOT_AWD
      TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
      MAX.EFC
      RAP
      DEGREE
      RT120
      AA010        AS 'AA010'
      AA013        AS 'AA013'
      SEX
      MAX.SA084    AS SA084
      MAX.RT020    AS RT020
-*
BY    STU_ID
BY    SW_FUND
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS  S059DSAC
-*
END
-RUN
-*
TABLE FILE RAFILE
-*
WRITE
-*
      RA110        AS RA110
      RA319        AS RA319
      RA320        AS RA320
      RA375        AS RA375
      RA380        AS CUM_GPA
-*
BY    STU_ID
-*
WHERE RA030        GT 0
WHERE RA305        CONTAINS 'U'
-*
ON    TABLE        HOLD     AS     S059ESAC
-*
END
-RUN
-*
SET   NODATA       = 0
SET  ALL    = PASS
-*
JOIN CLEAR *
JOIN STU_ID IN S059DSAC TO STU_ID   IN S059ESAC  AS JOINRA
JOIN STU_ID IN S059DSAC TO STU_ID   IN RBFILE    AS JOINRB
-*
DEFINE FILE S059DSAC ADD
CUM_HRS      /P09.2C= RA320+RA375;
CUM_ATT_HRS  /P09.2C= RA319+RA375;
NRB110       /A07 = IF (RB125 EQ 'Y') THEN RB110 ELSE ' ';
END
-*
TABLE FILE S059DSAC
-*
PRINT
-*
      SW_FUND
      TOT_AWD
      TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
      MAX.EFC
      RAP
      DEGREE
      RT120
      AA010
      AA013
      SEX
      MAX.CUM_GPA
      MAX.CUM_HRS
      MAX.CUM_ATT_HRS
      RA110
      RA319
      NRB110       AS RB110
      MAX.SA084    AS SA084
      MAX.RT020    AS RT020
-*
BY    SW_FUND
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS   S059FSAC
-*
END
-RUN
-*
TABLE FILE S059FSAC
-*
BY    RB110        AS RB110
-*
WHERE RB110        NE ' '
-*
ON    TABLE        HOLD     AS     HSSAC
-*
END
-RUN
-*
SET    PAGE        = OFF
SET    PAGE        = NOPAGE
SET    LINES       = 999999
-*
JOIN    RB110 IN HSSAC TO INSTITUTION IN AIFILE

DEFINE FILE HSSAC
WHS          /A30 = EDIT(INSTIT_NAME,'999999999999999999999999999999');
XHS          /A30 = CTRAN (30, WHS, 125, 64, XHS);
QTS          /A01 = '''';
TBL_HS       /A40 = RB110 | ' ' | QTS || XHS || QTS;
END
-*
TABLE FILE HSSAC
-*
WRITE
-*
      TBL_HS       AS TBL_HS
-*
BY    RB110
-*
WHERE RB110        NE '  '
-*
ON    TABLE        HOLD     AS     HSXSAC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXSAC
-*
WRITE
-*
      TBL_HS      AS TBL_HS1
-*
BY    RB110       NOPRINT
-*
WHERE RB110       IS-FROM '0000000' TO '0189999'
-*
ON    TABLE        HOLD     AS     HS1SAC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXSAC
-*
WRITE
-*
      TBL_HS      AS TBL_HS2
-*
BY    RB110       NOPRINT
-*
WHERE RB110       IS-FROM '0190000' TO '0363999'
-*
ON    TABLE        HOLD     AS     HS2SAC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXSAC
-*
WRITE
-*
      TBL_HS       AS TBL_HS3
-*
BY    RB110        NOPRINT
-*
WHERE RB110        IS-FROM '0364000' TO '0444999'
-*
ON    TABLE        HOLD     AS     HS3SAC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXSAC
-*
WRITE
-*
      TBL_HS       AS TBL_HS4
-*
BY    RB110        NOPRINT
-*
WHERE RB110        IS-FROM '0445000' TO '9999999'
-*
ON    TABLE        HOLD     AS     HS4SAC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE S059FSAC
-*
BY    RT120        AS RT120
-*
WHERE RT120        NE ' '
-*
ON    TABLE        HOLD     AS     MJR1SAC
-*
END
-RUN
-*
SET    PAGE        = OFF
SET    PAGE        = NOPAGE
SET    LINES       = 999999
-*
DEFINE FILE MJR1SAC
WMAJOR       /A30 = XSFOCT (30, 'RT120', RT120, 'UNKNOWN', WMAJOR);
XMAJOR       /A30 = CTRAN (30, WMAJOR, 125, 64, XMAJOR);
QTS          /A01 = '''';
MAJOR        /A37 = RT120 | ' ' | QTS || XMAJOR || QTS;
END
-*
TABLE FILE MJR1SAC
-*
PRINT
-*
      MAJOR
-*
BY    RT120       NOPRINT
-*
ON    TABLE        HOLD     AS     MJRSAC     FORMAT     ALPHA
-*
END
-RUN
-*
SET  ALL    = PASS
JOIN STU_ID IN S059FSAC TO STU_ID   IN ADFILE    AS JOINAD
-*
DEFINE FILE S059FSAC ADD
MJRTRANS     /A30 = DECODE RT120 (MJRSAC ELSE 'UNKNOWN');
TRANS_HS     /A30  = DECODE RB110 (HS1SAC ELSE 'OTHER');
TRANS_HS     /A30  = IF (TRANS_HS EQ 'OTHER') THEN
                     DECODE RB110 (HS2SAC ELSE 'OTHER');
TRANS_HS     /A30  = IF (TRANS_HS EQ 'OTHER') THEN
                     DECODE RB110 (HS3SAC ELSE 'OTHER');
TRANS_HS     /A30  = IF (TRANS_HS EQ 'OTHER') THEN
                     DECODE RB110 (HS4SAC ELSE 'OTHER');
INST_TRN     /A20 = EDIT (TRANS_HS,    '99999999999999999999$');
ETH_ORIG_AA  /A01 = AA013;
ETHNICITY    /A05 = IF ETH_ORIG_AA EQ '1' THEN 'Cauc'            ELSE
                    IF ETH_ORIG_AA EQ '2' THEN 'Blk'             ELSE
                    IF ETH_ORIG_AA EQ '3' THEN 'Hisp'            ELSE
                    IF ETH_ORIG_AA EQ '4' THEN 'Asian'           ELSE
                    IF ETH_ORIG_AA EQ '5' THEN 'Am.In'           ELSE
                    IF ETH_ORIG_AA EQ '6' THEN 'Other'           ELSE
                    'Unk';
END
-*
TABLE FILE S059FSAC
-*
WRITE
-*
      SW_FUND
      MAX.TOT_AWD
      MAX.TOT_ERND
      MAX.FALLAWD
      MAX.SPRAWD
      MAX.SSIAWD
      MAX.SSIIAWD
      MAX.FALLERND
      MAX.SPRERND
      MAX.SSIERND
      MAX.SSIIERND
      AWD_YR
      MAX.EFC
      RAP
-*
BY    SW_FUND
BY    STU_ID
-*
WRITE
-*
      DEGREE
      RT120
      MJRTRANS
      AA010
      AA013
      SEX
      FST.AD260/A05    AS AD260
      FST.ADDR_TYPE_1
      MAX.CUM_GPA
      MAX.CUM_HRS
      MAX.CUM_ATT_HRS
      MAX.RB110        AS RB110
      MAX.INST_TRN
      ETHNICITY
AND   COMPUTE
      COL/A03      = 'SAC';
      MAX.SA084
      MAX.RT020
-*
BY    SW_FUND
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS   S059GSAC
-*
END
-RUN
-*
-IF    &INST      EQ '01'   GOTO     BYCONC;
-IF    &INST      EQ '00'   GOTO     SPCCOL;
-*
-***********************SPC*****************************
-SPCCOL
-*
EX DYNALLOC DD=AAFILE,DSN=SPC.AAFILE
EX DYNALLOC DD=ADFILE,DSN=SPC.ADFILE
EX DYNALLOC DD=AIFILE,DSN=SPC.AIFILE
EX DYNALLOC DD=RAFILE,DSN=SPC.RAFILE
EX DYNALLOC DD=RBFILE,DSN=SPC.RBFILE
EX DYNALLOC DD=RTFILE,DSN=SPC.RTFILE
EX DYNALLOC DD=SAFILE,DSN=SPC.SAFILE
EX DYNALLOC DD=SWFILE,DSN=SPC.SWFILE
-*
JOIN CLEAR *
-*
DEFINE FILE SWFILE
NKEY         /A5  = SW_FUND;
FALLAWD      /P04 = IF (SW121 EQ '&DISBID1') THEN SW123 ELSE 0;
SPRAWD       /P04 = IF (SW121 EQ '&DISBID2') THEN SW123 ELSE 0;
SSIAWD       /P04 = IF (SW121 EQ '&DISBID3') THEN SW123 ELSE 0;
SSIIAWD      /P04 = IF (SW121 EQ '&DISBID4') THEN SW123 ELSE 0;
FALLERND     /P04 = IF (SW121 EQ '&DISBID1') THEN SW124 ELSE 0;
SPRERND      /P04 = IF (SW121 EQ '&DISBID2') THEN SW124 ELSE 0;
SSIERND      /P04 = IF (SW121 EQ '&DISBID3') THEN SW124 ELSE 0;
SSIIERND     /P04 = IF (SW121 EQ '&DISBID4') THEN SW124 ELSE 0;
END
-*
TABLE FILE SWFILE
-*
WRITE
-*
      SW123        AS TOT_AWD
      SW124        AS TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
-*
BY    STU_ID
BY    SW_FUND
-*
WHERE AWD_YR       EQ '&AWDYR' AND AWD_PER_ID NE ' ';
WHERE SW123        GT 0
OR    SW124        GT 0
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS    S059ASPC
-*
END
-RUN
-*
-IF     &RECORDS       EQ  0    GOTO QQ;
-*
-*===============================================================
-*=================   PROCESSING SAFILE  ========================
-*===============================================================
-*
DEFINE FILE SAFILE
SAKEY        /A13 = ROOT_KEY;
END
-*
TABLE FILE SAFILE
-*
WRITE
-*
      STU_ID
      SA084        AS SA084
      SA2C4        AS EFC
      PK_RAP_CODE  AS RAP
      AWD_YR
-*
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
WHERE AWD_YR       EQ '&AWDYR'
-*
ON    TABLE        HOLD  AS    S059BSPC
-*
END
-RUN
-*
-IF     &RECORDS       EQ  0    GOTO QQ;
-*
-*
-*===============================================================
-*=================   PROCESSING RTFILE  ========================
-*===============================================================
-*
TABLE FILE RTFILE
-*
WRITE
-*
      RT020        AS RT020
      RT115        AS DEGREE
      RT120        AS RT120
-*
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
-IF   &TYPETERM    EQ 'ONE'  GOTO    SELONEB    ELSE   GOTO   SEL4B;
-*
-SELONEB
-*
WHERE TERM         EQ '&TERM1'
-GOTO ENDCB
-*
-SEL4B
-*
WHERE TERM         EQ '&TERM1' OR '&TERM2' OR '&TERM3' OR '&TERM4'
-*
-ENDCB
-*
ON    TABLE        HOLD AS     S059CSPC
-*
END
-RUN
-*
SET  ALL    = PASS
JOIN CLEAR *
JOIN STU_ID IN S059ASPC TO STU_ID   IN AAFILE       AS SATOAA2
JOIN STU_ID IN S059ASPC TO STU_ID   IN S059BSPC     AS SASW2
JOIN STU_ID IN S059ASPC TO STU_ID   IN S059CSPC     AS SART2
-*
TABLE FILE S059ASPC
-*
WRITE
-*
      SW_FUND
      TOT_AWD
      TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
      MAX.EFC
      RAP
      DEGREE
      RT120
      AA010        AS 'AA010'
      AA013        AS 'AA013'
      SEX
      MAX.SA084    AS SA084
      MAX.RT020    AS RT020
-*
BY    STU_ID
BY    SW_FUND
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS  S059DSPC
-*
END
-RUN
-*
TABLE FILE RAFILE
-*
WRITE
-*
      RA110        AS RA110
      RA319        AS RA319
      RA320        AS RA320
      RA375        AS RA375
      RA380        AS CUM_GPA
-*
BY    STU_ID
-*
WHERE RA030        GT 0
WHERE RA305        CONTAINS 'U'
-*
ON    TABLE        HOLD     AS     S059ESPC
-*
END
-RUN
-*
SET  ALL    = PASS
SET   NODATA       = 0
-*
JOIN CLEAR *
JOIN STU_ID IN S059DSPC TO STU_ID   IN S059ESPC  AS JOINRA2
JOIN STU_ID IN S059DSPC TO STU_ID   IN RBFILE    AS JOINRB2
-*
DEFINE FILE S059DSPC ADD
CUM_HRS      /P09.2C= RA320+RA375;
CUM_ATT_HRS  /P09.2C= RA319+RA375;
NRB110       /A07 = IF (RB125 EQ 'Y') THEN RB110 ELSE ' ';
END
-*
TABLE FILE S059DSPC
-*
PRINT
-*
      SW_FUND
      TOT_AWD
      TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
      MAX.EFC
      RAP
      DEGREE
      RT120
      AA010
      AA013
      SEX
      MAX.CUM_GPA
      MAX.CUM_HRS
      MAX.CUM_ATT_HRS
      RA110
      RA319
      NRB110       AS RB110
      MAX.SA084
      MAX.RT020
-*
BY    SW_FUND
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS   S059FSPC
-*
END
-RUN
-*
TABLE FILE S059FSPC
-*
BY    RB110        AS RB110
-*
WHERE RB110        NE ' '
-*
ON    TABLE        HOLD     AS     HSSPC
-*
END
-RUN
-*
SET    PAGE        = OFF
SET    PAGE        = NOPAGE
SET    LINES       = 999999
-*
JOIN    RB110 IN HSSPC TO INSTITUTION IN AIFILE   AS RBAI2
-*
DEFINE FILE HSSPC
WHS          /A30 = EDIT(INSTIT_NAME,'999999999999999999999999999999');
XHS          /A30 = CTRAN (30, WHS, 125, 64, XHS);
QTS          /A01 = '''';
TBL_HS       /A40 = RB110 | ' ' | QTS || XHS || QTS;
END
-*
TABLE FILE HSSPC
-*
WRITE
-*
      TBL_HS       AS TBL_HS
-*
BY    RB110
-*
WHERE RB110        NE '  '
-*
ON    TABLE        HOLD     AS     HSXSPC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXSPC
-*
WRITE
-*
      TBL_HS      AS TBL_HS1
-*
BY    RB110       NOPRINT
-*
WHERE RB110       IS-FROM '0000000' TO '0189999'
-*
ON    TABLE        HOLD     AS     HS1SPC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXSPC
-*
WRITE
-*
      TBL_HS      AS TBL_HS2
-*
BY    RB110       NOPRINT
-*
WHERE RB110       IS-FROM '0190000' TO '0363999'
-*
ON    TABLE        HOLD     AS     HS2SPC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXSPC
-*
WRITE
-*
      TBL_HS       AS TBL_HS3
-*
BY    RB110        NOPRINT
-*
WHERE RB110        IS-FROM '0364000' TO '0444999'
-*
ON    TABLE        HOLD     AS     HS3SPC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXSPC
-*
WRITE
-*
      TBL_HS       AS TBL_HS4
-*
BY    RB110        NOPRINT
-*
WHERE RB110        IS-FROM '0445000' TO '9999999'
-*
ON    TABLE        HOLD     AS     HS4SPC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE S059FSPC
-*
BY    RT120        AS RT120
-*
WHERE RT120        NE ' '
-*
ON    TABLE        HOLD     AS     MJR1SPC
-*
END
-RUN
-*
SET    PAGE        = OFF
SET    PAGE        = NOPAGE
SET    LINES       = 999999
-*
DEFINE FILE MJR1SPC
WMAJOR       /A30 = XSFOCT (30, 'RT120', RT120, 'UNKNOWN', WMAJOR);
XMAJOR       /A30 = CTRAN (30, WMAJOR, 125, 64, XMAJOR);
QTS          /A01 = '''';
MAJOR        /A37 = RT120 | ' ' | QTS || XMAJOR || QTS;
END
-*
TABLE FILE MJR1SPC
-*
PRINT
-*
      MAJOR
-*
BY    RT120       NOPRINT
-*
ON    TABLE        HOLD     AS     MJRSPC     FORMAT     ALPHA
-*
END
-RUN
-*
SET  ALL    = PASS
JOIN STU_ID IN S059FSPC TO STU_ID   IN ADFILE    AS JOINAD2
-*
DEFINE FILE S059FSPC ADD
MJRTRANS     /A30 = DECODE RT120 (MJRSPC ELSE 'UNKNOWN');
TRANS_HS     /A30  = DECODE RB110 (HS1SPC ELSE 'OTHER');
TRANS_HS     /A30  = IF (TRANS_HS EQ 'OTHER') THEN
                     DECODE RB110 (HS2SPC ELSE 'OTHER');
TRANS_HS     /A30  = IF (TRANS_HS EQ 'OTHER') THEN
                     DECODE RB110 (HS3SPC ELSE 'OTHER');
TRANS_HS     /A30  = IF (TRANS_HS EQ 'OTHER') THEN
                     DECODE RB110 (HS4SPC ELSE 'OTHER');
INST_TRN     /A20 = EDIT (TRANS_HS,    '99999999999999999999$');
ETH_ORIG_AA  /A01 = AA013;
ETHNICITY    /A05 = IF ETH_ORIG_AA EQ '1' THEN 'Cauc'            ELSE
                    IF ETH_ORIG_AA EQ '2' THEN 'Blk'             ELSE
                    IF ETH_ORIG_AA EQ '3' THEN 'Hisp'            ELSE
                    IF ETH_ORIG_AA EQ '4' THEN 'Asian'           ELSE
                    IF ETH_ORIG_AA EQ '5' THEN 'Am.In'           ELSE
                    IF ETH_ORIG_AA EQ '6' THEN 'Other'           ELSE
                    'Unk';
END
-*
TABLE FILE S059FSPC
-*
WRITE
-*
      SW_FUND
      MAX.TOT_AWD
      MAX.TOT_ERND
      MAX.FALLAWD
      MAX.SPRAWD
      MAX.SSIAWD
      MAX.SSIIAWD
      MAX.FALLERND
      MAX.SPRERND
      MAX.SSIERND
      MAX.SSIIERND
      AWD_YR
      MAX.EFC
      RAP
-*
BY    SW_FUND
BY    STU_ID
-*
WRITE
-*
      DEGREE
      RT120
      MJRTRANS
      AA010
      AA013
      SEX
      FST.AD260/A05    AS AD260
      FST.ADDR_TYPE_1
      MAX.CUM_GPA
      MAX.CUM_HRS
      MAX.CUM_ATT_HRS
      MAX.RB110        AS RB110
      MAX.INST_TRN
      ETHNICITY
AND   COMPUTE
      COL/A03      = 'SPC';
      MAX.SA084
      MAX.RT020
-*
BY    SW_FUND
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS   S059GSPC
-*
END
-RUN
-*
-IF    &INST      EQ '02'   GOTO     BYCONC;
-IF    &INST      EQ '00'   GOTO     PACCOL;
-*
-***********************PAC*****************************
-*
-PACCOL
-*
EX DYNALLOC DD=AAFILE,DSN=PAC.AAFILE
EX DYNALLOC DD=ADFILE,DSN=PAC.ADFILE
EX DYNALLOC DD=AIFILE,DSN=PAC.AIFILE
EX DYNALLOC DD=RAFILE,DSN=PAC.RAFILE
EX DYNALLOC DD=RBFILE,DSN=PAC.RBFILE
EX DYNALLOC DD=RTFILE,DSN=PAC.RTFILE
EX DYNALLOC DD=SAFILE,DSN=PAC.SAFILE
EX DYNALLOC DD=SWFILE,DSN=PAC.SWFILE
-*
JOIN CLEAR *
-*
DEFINE FILE SWFILE
NKEY         /A5  = SW_FUND;
FALLAWD      /P04 = IF (SW121 EQ '&DISBID1') THEN SW123 ELSE 0;
SPRAWD       /P04 = IF (SW121 EQ '&DISBID2') THEN SW123 ELSE 0;
SSIAWD       /P04 = IF (SW121 EQ '&DISBID3') THEN SW123 ELSE 0;
SSIIAWD      /P04 = IF (SW121 EQ '&DISBID4') THEN SW123 ELSE 0;
FALLERND     /P04 = IF (SW121 EQ '&DISBID1') THEN SW124 ELSE 0;
SPRERND      /P04 = IF (SW121 EQ '&DISBID2') THEN SW124 ELSE 0;
SSIERND      /P04 = IF (SW121 EQ '&DISBID3') THEN SW124 ELSE 0;
SSIIERND     /P04 = IF (SW121 EQ '&DISBID4') THEN SW124 ELSE 0;
END
-*
TABLE FILE SWFILE
-*
WRITE
-*
      SW123        AS TOT_AWD
      SW124        AS TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
-*
BY    STU_ID
BY    SW_FUND
-*
WHERE AWD_YR       EQ '&AWDYR' AND AWD_PER_ID NE ' ';
WHERE SW123        GT 0
OR    SW124        GT 0
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS    S059APAC
-*
END
-RUN
-*
-IF     &RECORDS       EQ  0    GOTO QQ;
-*
-*===============================================================
-*=================   PROCESSING SAFILE  ========================
-*===============================================================
-*
DEFINE FILE SAFILE
SAKEY        /A13 = ROOT_KEY;
END
-*
TABLE FILE SAFILE
-*
WRITE
-*
      STU_ID
      SA084        AS SA084
      SA2C4        AS EFC
      PK_RAP_CODE  AS RAP
      AWD_YR
-*
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
WHERE AWD_YR       EQ '&AWDYR'
-*
ON    TABLE        HOLD  AS    S059BPAC
-*
END
-RUN
-*
-IF     &RECORDS       EQ  0    GOTO QQ;
-*
-*
-*===============================================================
-*=================   PROCESSING RTFILE  ========================
-*===============================================================
-*
TABLE FILE RTFILE
-*
WRITE
-*
      RT020        AS RT020
      RT115        AS DEGREE
      RT120        AS RT120
-*
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
-IF   &TYPETERM    EQ 'ONE'  GOTO    SELONEC    ELSE   GOTO   SEL4C;
-*
-SELONEC
-*
WHERE TERM         EQ '&TERM1'
-GOTO ENDCC
-*
-SEL4C
-*
WHERE TERM         EQ '&TERM1' OR '&TERM2' OR '&TERM3' OR '&TERM4'
-*
-ENDCC
-*
ON    TABLE        HOLD AS     S059CPAC
-*
END
-RUN
-*
SET  ALL    = PASS
JOIN CLEAR *
JOIN STU_ID IN S059APAC TO STU_ID   IN AAFILE       AS SATOAA3
JOIN STU_ID IN S059APAC TO STU_ID   IN S059BPAC     AS SASW3
JOIN STU_ID IN S059APAC TO STU_ID   IN S059CPAC     AS SART3
-*
TABLE FILE S059APAC
-*
WRITE
-*
      SW_FUND
      TOT_AWD
      TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
      MAX.EFC
      RAP
      DEGREE
      RT120
      AA010        AS 'AA010'
      AA013        AS 'AA013'
      SEX
      MAX.SA084
      MAX.RT020
-*
BY    STU_ID
BY    SW_FUND
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS  S059DPAC
-*
END
-RUN
-*
TABLE FILE RAFILE
-*
WRITE
-*
      RA110        AS RA110
      RA319        AS RA319
      RA320        AS RA320
      RA375        AS RA375
      RA380        AS CUM_GPA
-*
BY    STU_ID
-*
WHERE RA030        GT 0
WHERE RA305        CONTAINS 'U'
-*
ON    TABLE        HOLD     AS     S059EPAC
-*
END
-RUN
-*
SET  ALL    = PASS
SET   NODATA       = 0
-*
JOIN CLEAR *
JOIN STU_ID IN S059DPAC TO STU_ID   IN S059EPAC  AS JOINRAC
JOIN STU_ID IN S059DPAC TO STU_ID   IN RBFILE    AS JOINRBC
-*
DEFINE FILE S059DPAC ADD
CUM_HRS      /P09.2C= RA320+RA375;
CUM_ATT_HRS  /P09.2C= RA319+RA375;
NRB110       /A07 = IF (RB125 EQ 'Y') THEN RB110 ELSE ' ';
END
-*
TABLE FILE S059DPAC
-*
PRINT
-*
      SW_FUND
      TOT_AWD
      TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
      MAX.EFC
      RAP
      DEGREE
      RT120
      AA010
      AA013
      SEX
      MAX.CUM_GPA
      MAX.CUM_HRS
      MAX.CUM_ATT_HRS
      RA110
      RA319
      NRB110       AS RB110
      MAX.SA084
      MAX.RT020
-*
BY    SW_FUND
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS   S059FPAC
-*
END
-RUN
-*
TABLE FILE S059FPAC
-*
BY    RB110        AS RB110
-*
WHERE RB110        NE ' '
-*
ON    TABLE        HOLD     AS     HSPAC
-*
END
-RUN
-*
SET    PAGE        = OFF
SET    PAGE        = NOPAGE
SET    LINES       = 999999
-*
JOIN    RB110 IN HSPAC TO INSTITUTION IN AIFILE AS RBAI3
-*
DEFINE FILE HSPAC
WHS          /A30 = EDIT(INSTIT_NAME,'999999999999999999999999999999');
XHS          /A30 = CTRAN (30, WHS, 125, 64, XHS);
QTS          /A01 = '''';
TBL_HS       /A40 = RB110 | ' ' | QTS || XHS || QTS;
END
-*
TABLE FILE HSPAC
-*
WRITE
-*
      TBL_HS       AS TBL_HS
-*
BY    RB110
-*
WHERE RB110        NE '  '
-*
ON    TABLE        HOLD     AS     HSXPAC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXPAC
-*
WRITE
-*
      TBL_HS      AS TBL_HS1
-*
BY    RB110       NOPRINT
-*
WHERE RB110       IS-FROM '0000000' TO '0189999'
-*
ON    TABLE        HOLD     AS     HS1PAC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXPAC
-*
WRITE
-*
      TBL_HS      AS TBL_HS2
-*
BY    RB110       NOPRINT
-*
WHERE RB110       IS-FROM '0190000' TO '0363999'
-*
ON    TABLE        HOLD     AS     HS2PAC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXPAC
-*
WRITE
-*
      TBL_HS       AS TBL_HS3
-*
BY    RB110        NOPRINT
-*
WHERE RB110        IS-FROM '0364000' TO '0444999'
-*
ON    TABLE        HOLD     AS     HS3PAC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXPAC
-*
WRITE
-*
      TBL_HS       AS TBL_HS4
-*
BY    RB110        NOPRINT
-*
WHERE RB110        IS-FROM '0445000' TO '9999999'
-*
ON    TABLE        HOLD     AS     HS4PAC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE S059FPAC
-*
BY    RT120        AS RT120
-*
WHERE RT120        NE ' '
-*
ON    TABLE        HOLD     AS     MJR1PAC
-*
END
-RUN
-*
SET    PAGE        = OFF
SET    PAGE        = NOPAGE
SET    LINES       = 999999
-*
DEFINE FILE MJR1PAC
WMAJOR       /A30 = XSFOCT (30, 'RT120', RT120, 'UNKNOWN', WMAJOR);
XMAJOR       /A30 = CTRAN (30, WMAJOR, 125, 64, XMAJOR);
QTS          /A01 = '''';
MAJOR        /A37 = RT120 | ' ' | QTS || XMAJOR || QTS;
END
-*
TABLE FILE MJR1PAC
-*
PRINT
-*
      MAJOR
-*
BY    RT120       NOPRINT
-*
ON    TABLE        HOLD     AS     MJRPAC     FORMAT     ALPHA
-*
END
-RUN
-*
SET  ALL    = PASS
JOIN STU_ID IN S059FPAC TO STU_ID   IN ADFILE    AS JOINAD3
-*
DEFINE FILE S059FPAC ADD
MJRTRANS     /A30 = DECODE RT120 (MJRPAC ELSE 'UNKNOWN');
TRANS_HS     /A30  = DECODE RB110 (HS1PAC ELSE 'OTHER');
TRANS_HS     /A30  = IF (TRANS_HS EQ 'OTHER') THEN
                     DECODE RB110 (HS2PAC ELSE 'OTHER');
TRANS_HS     /A30  = IF (TRANS_HS EQ 'OTHER') THEN
                     DECODE RB110 (HS3PAC ELSE 'OTHER');
TRANS_HS     /A30  = IF (TRANS_HS EQ 'OTHER') THEN
                     DECODE RB110 (HS4PAC ELSE 'OTHER');
INST_TRN     /A20 = EDIT (TRANS_HS,    '99999999999999999999$');
ETH_ORIG_AA  /A01 = AA013;
ETHNICITY    /A05 = IF ETH_ORIG_AA EQ '1' THEN 'Cauc'            ELSE
                    IF ETH_ORIG_AA EQ '2' THEN 'Blk'             ELSE
                    IF ETH_ORIG_AA EQ '3' THEN 'Hisp'            ELSE
                    IF ETH_ORIG_AA EQ '4' THEN 'Asian'           ELSE
                    IF ETH_ORIG_AA EQ '5' THEN 'Am.In'           ELSE
                    IF ETH_ORIG_AA EQ '6' THEN 'Other'           ELSE
                    'Unk';
END
-*
TABLE FILE S059FPAC
-*
WRITE
-*
      SW_FUND
      MAX.TOT_AWD
      MAX.TOT_ERND
      MAX.FALLAWD
      MAX.SPRAWD
      MAX.SSIAWD
      MAX.SSIIAWD
      MAX.FALLERND
      MAX.SPRERND
      MAX.SSIERND
      MAX.SSIIERND
      AWD_YR
      MAX.EFC
      RAP
-*
BY    SW_FUND
BY    STU_ID
-*
WRITE
-*
      DEGREE
      RT120
      MJRTRANS
      AA010
      AA013
      SEX
      FST.AD260/A05    AS AD260
      FST.ADDR_TYPE_1
      MAX.CUM_GPA
      MAX.CUM_HRS
      MAX.CUM_ATT_HRS
      MAX.RB110        AS RB110
      MAX.INST_TRN
      ETHNICITY
AND   COMPUTE
      COL/A03      = 'PAC';
      MAX.SA084
      MAX.RT020
-*
BY    SW_FUND
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS   S059GPAC
-*
END
-RUN
-*
-IF    &INST      EQ '03'   GOTO     BYCONC;
-IF    &INST      EQ '00'   GOTO     NVCCOL;
-*
-***********************NVC*****************************
-*
-NVCCOL
-*
EX DYNALLOC DD=AAFILE,DSN=NVC.AAFILE
EX DYNALLOC DD=ADFILE,DSN=NVC.ADFILE
EX DYNALLOC DD=AIFILE,DSN=NVC.AIFILE
EX DYNALLOC DD=RAFILE,DSN=NVC.RAFILE
EX DYNALLOC DD=RBFILE,DSN=NVC.RBFILE
EX DYNALLOC DD=RTFILE,DSN=NVC.RTFILE
EX DYNALLOC DD=SAFILE,DSN=NVC.SAFILE
EX DYNALLOC DD=SWFILE,DSN=NVC.SWFILE
-*
JOIN CLEAR *
-*
DEFINE FILE SWFILE
NKEY         /A5  = SW_FUND;
FALLAWD      /P04 = IF (SW121 EQ '&DISBID1') THEN SW123 ELSE 0;
SPRAWD       /P04 = IF (SW121 EQ '&DISBID2') THEN SW123 ELSE 0;
SSIAWD       /P04 = IF (SW121 EQ '&DISBID3') THEN SW123 ELSE 0;
SSIIAWD      /P04 = IF (SW121 EQ '&DISBID4') THEN SW123 ELSE 0;
FALLERND     /P04 = IF (SW121 EQ '&DISBID1') THEN SW124 ELSE 0;
SPRERND      /P04 = IF (SW121 EQ '&DISBID2') THEN SW124 ELSE 0;
SSIERND      /P04 = IF (SW121 EQ '&DISBID3') THEN SW124 ELSE 0;
SSIIERND     /P04 = IF (SW121 EQ '&DISBID4') THEN SW124 ELSE 0;
END
-*
TABLE FILE SWFILE
-*
WRITE
-*
      SW123        AS TOT_AWD
      SW124        AS TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
-*
BY    STU_ID
BY    SW_FUND
-*
WHERE AWD_YR       EQ '&AWDYR' AND AWD_PER_ID NE ' ';
WHERE SW123        GT 0
OR    SW124        GT 0
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS    S059ANVC
-*
END
-RUN
-*
-IF     &RECORDS       EQ  0    GOTO QQ;
-*
-*===============================================================
-*=================   PROCESSING SAFILE  ========================
-*===============================================================
-*
DEFINE FILE SAFILE
SAKEY        /A13 = ROOT_KEY;
END
-*
TABLE FILE SAFILE
-*
WRITE
-*
      STU_ID
      SA084        AS SA084
      SA2C4        AS EFC
      PK_RAP_CODE  AS RAP
      AWD_YR
-*
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
WHERE AWD_YR       EQ '&AWDYR'
-*
ON    TABLE        HOLD  AS    S059BNVC
-*
END
-RUN
-*
-IF     &RECORDS       EQ  0    GOTO QQ;
-*
-*
-*===============================================================
-*=================   PROCESSING RTFILE  ========================
-*===============================================================
-*
TABLE FILE RTFILE
-*
WRITE
-*
      RT020        AS RT020
      RT115        AS DEGREE
      RT120        AS RT120
-*
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
-IF   &TYPETERM    EQ 'ONE'  GOTO    SELONED    ELSE   GOTO   SEL4D;
-*
-SELONED
-*
WHERE TERM         EQ '&TERM1'
-GOTO ENDCD
-*
-SEL4D
-*
WHERE TERM         EQ '&TERM1' OR '&TERM2' OR '&TERM3' OR '&TERM4'
-*
-ENDCD
-*
ON    TABLE        HOLD AS     S059CNVC
-*
END
-RUN
-*
SET  ALL    = PASS
JOIN CLEAR *
JOIN STU_ID IN S059ANVC TO STU_ID   IN AAFILE       AS SATOAA4
JOIN STU_ID IN S059ANVC TO STU_ID   IN S059BNVC     AS SASW4
JOIN STU_ID IN S059ANVC TO STU_ID   IN S059CNVC     AS SART4
-*
TABLE FILE S059ANVC
-*
WRITE
-*
      SW_FUND
      TOT_AWD
      TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
      MAX.EFC
      RAP
      DEGREE
      RT120
      AA010        AS 'AA010'
      AA013        AS 'AA013'
      SEX
      MAX.SA084
      MAX.RT020
-*
BY    STU_ID
BY    SW_FUND
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS  S059DNVC
-*
END
-RUN
-*
TABLE FILE RAFILE
-*
WRITE
-*
      RA110        AS RA110
      RA319        AS RA319
      RA320        AS RA320
      RA375        AS RA375
      RA380        AS CUM_GPA
-*
BY    STU_ID
-*
WHERE RA030        GT 0
WHERE RA305        CONTAINS 'U'
-*
ON    TABLE        HOLD     AS     S059ENVC
-*
END
-RUN
-*
SET   NODATA       = 0
SET   ALL          = PASS
-*
JOIN CLEAR *
JOIN STU_ID IN S059DNVC TO STU_ID   IN S059ENVC  AS JOINRA4
JOIN STU_ID IN S059DNVC TO STU_ID   IN RBFILE    AS JOINRB4
-*
DEFINE FILE S059DNVC ADD
CUM_HRS      /P09.2C= RA320+RA375;
CUM_ATT_HRS  /P09.2C= RA319+RA375;
NRB110       /A07 = IF (RB125 EQ 'Y') THEN RB110 ELSE ' ';
END
-*
TABLE FILE S059DNVC
-*
PRINT
-*
      SW_FUND
      TOT_AWD
      TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
      MAX.EFC
      RAP
      DEGREE
      RT120
      AA010
      AA013
      SEX
      MAX.CUM_GPA
      MAX.CUM_HRS
      MAX.CUM_ATT_HRS
      RA110
      RA319
      NRB110       AS RB110
      MAX.SA084
      MAX.RT020
-*
BY    SW_FUND
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';
-*
ON    TABLE        HOLD    AS   S059FNVC
-*
END
-RUN
-*
TABLE FILE S059FNVC
-*
BY    RB110        AS RB110
-*
WHERE RB110        NE ' '
-*
ON    TABLE        HOLD     AS     HSNVC
-*
END
-RUN
-*
SET    PAGE        = OFF
SET    PAGE        = NOPAGE
SET    LINES       = 999999
-*
JOIN    RB110 IN HSNVC TO INSTITUTION IN AIFILE AS RBAI4
-*
DEFINE FILE HSNVC
WHS          /A30 = EDIT(INSTIT_NAME,'999999999999999999999999999999');
XHS          /A30 = CTRAN (30, WHS, 125, 64, XHS);
QTS          /A01 = '''';
TBL_HS       /A40 = RB110 | ' ' | QTS || XHS || QTS;
END
-*
TABLE FILE HSNVC
-*
WRITE
-*
      TBL_HS       AS TBL_HS
-*
BY    RB110
-*
WHERE RB110        NE '  '
-*
ON    TABLE        HOLD     AS     HSXNVC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXNVC
-*
WRITE
-*
      TBL_HS      AS TBL_HS1
-*
BY    RB110       NOPRINT
-*
WHERE RB110       IS-FROM '0000000' TO '0189999'
-*
ON    TABLE        HOLD     AS     HS1NVC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXNVC
-*
WRITE
-*
      TBL_HS      AS TBL_HS2
-*
BY    RB110       NOPRINT
-*
WHERE RB110       IS-FROM '0190000' TO '0363999'
-*
ON    TABLE        HOLD     AS     HS2NVC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXNVC
-*
WRITE
-*
      TBL_HS       AS TBL_HS3
-*
BY    RB110        NOPRINT
-*
WHERE RB110        IS-FROM '0364000' TO '0444999'
-*
ON    TABLE        HOLD     AS     HS3NVC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE HSXNVC
-*
WRITE
-*
      TBL_HS       AS TBL_HS4
-*
BY    RB110        NOPRINT
-*
WHERE RB110        IS-FROM '0445000' TO '9999999'
-*
ON    TABLE        HOLD     AS     HS4NVC     FORMAT     ALPHA
-*
END
-RUN
-*
TABLE FILE S059FNVC
-*
BY    RT120        AS RT120
-*
WHERE RT120        NE ' '
-*
ON    TABLE        HOLD     AS     MJR1NVC
-*
END
-RUN
-*
SET    PAGE        = OFF
SET    PAGE        = NOPAGE
SET    LINES       = 999999
-*
DEFINE FILE MJR1NVC
WMAJOR       /A30 = XSFOCT (30, 'RT120', RT120, 'UNKNOWN', WMAJOR);
XMAJOR       /A30 = CTRAN (30, WMAJOR, 125, 64, XMAJOR);
QTS          /A01 = '''';
MAJOR        /A37 = RT120 | ' ' | QTS || XMAJOR || QTS;
END
-*
TABLE FILE MJR1NVC
-*
PRINT
-*
      MAJOR
-*
BY    RT120       NOPRINT
-*
ON    TABLE        HOLD     AS     MJRNVC     FORMAT     ALPHA
-*
END
-RUN
-*
SET  ALL    = PASS
JOIN STU_ID IN S059FNVC TO STU_ID   IN ADFILE    AS JOINAD4
-*
DEFINE FILE S059FNVC ADD
MJRTRANS     /A30 = DECODE RT120 (MJRNVC ELSE 'UNKNOWN');
TRANS_HS     /A30  = DECODE RB110 (HS1NVC ELSE 'OTHER');
TRANS_HS     /A30  = IF (TRANS_HS EQ 'OTHER') THEN
                     DECODE RB110 (HS2NVC ELSE 'OTHER');
TRANS_HS     /A30  = IF (TRANS_HS EQ 'OTHER') THEN
                     DECODE RB110 (HS3NVC ELSE 'OTHER');
TRANS_HS     /A30  = IF (TRANS_HS EQ 'OTHER') THEN
                     DECODE RB110 (HS4NVC ELSE 'OTHER');
INST_TRN     /A20 = EDIT (TRANS_HS,    '99999999999999999999$');
ETH_ORIG_AA  /A01 = AA013;
ETHNICITY    /A05 = IF ETH_ORIG_AA EQ '1' THEN 'Cauc'            ELSE
                    IF ETH_ORIG_AA EQ '2' THEN 'Blk'             ELSE
                    IF ETH_ORIG_AA EQ '3' THEN 'Hisp'            ELSE
                    IF ETH_ORIG_AA EQ '4' THEN 'Asian'           ELSE
                    IF ETH_ORIG_AA EQ '5' THEN 'Am.In'           ELSE
                    IF ETH_ORIG_AA EQ '6' THEN 'Other'           ELSE
                    'Unk';
END
-*
TABLE FILE S059FNVC
-*
WRITE
-*
      SW_FUND
      MAX.TOT_AWD
      MAX.TOT_ERND
      MAX.FALLAWD
      MAX.SPRAWD
      MAX.SSIAWD
      MAX.SSIIAWD
      MAX.FALLERND
      MAX.SPRERND
      MAX.SSIERND
      MAX.SSIIERND
      AWD_YR
      MAX.EFC
      RAP
-*
BY    SW_FUND
BY    STU_ID
-*
WRITE
-*
      DEGREE
      RT120
      MJRTRANS
      AA010
      AA013
      SEX
      FST.AD260/A05    AS AD260
      FST.ADDR_TYPE_1
      MAX.CUM_GPA
      MAX.CUM_HRS
      MAX.CUM_ATT_HRS
      MAX.RB110        AS RB110
      MAX.INST_TRN
      ETHNICITY
AND   COMPUTE
      COL/A03      = 'NVC';
      MAX.SA084
      MAX.RT020
-*
BY    SW_FUND
BY    STU_ID
-*
WHERE STU_ID       IS-FROM '&STARTKEY' TO '&ENDKEY';

-*
ON    TABLE        HOLD    AS   S059GNVC
-*
END
-RUN
-*
-TABLTHIS
-*
-IF   &INST        EQ '00'  THEN    GOTO    ALLCOL2 ELSE GOTO BYCONC;
-*
-ALLCOL2
-*
DYNAM CONCAT DD S059GSAC S059GSPC S059GPAC S059GNVC
-*
-BYCONC
-*
DEFINE FILE &FILENM
TERM1        /A05 = '&TERM';
SEM          /A01 = EDIT (TERM1, '$$$$9');
TYPETERM     /A03 = '&TYPETERM';
AWARD        /P08 = IF (TYPETERM EQ 'ONE') AND (SEM EQ '1') THEN
                    FALLAWD ELSE
                    IF (TYPETERM EQ 'ONE') AND (SEM EQ '2') THEN
                    SPRAWD ELSE
                    IF (TYPETERM EQ 'ONE') AND (SEM EQ '3') THEN
                    SSIAWD ELSE
                    IF (TYPETERM EQ 'ONE') AND (SEM EQ '4') THEN
                    SSIIAWD ELSE TOT_AWD;
PAID         /P08 = IF (TYPETERM EQ 'ONE') AND (SEM EQ '1') THEN
                    FALLERND ELSE
                    IF (TYPETERM EQ 'ONE') AND (SEM EQ '2') THEN
                    SPRERND ELSE
                    IF (TYPETERM EQ 'ONE') AND (SEM EQ '3') THEN
                    SSIERND ELSE
                    IF (TYPETERM EQ 'ONE') AND (SEM EQ '4') THEN
                    SSIIERND ELSE TOT_ERND;
END
-*
TABLE FILE &FILENM
-*
WRITE
-*
      SW_FUND
      TOT_AWD
      TOT_ERND
      FALLAWD
      SPRAWD
      SSIAWD
      SSIIAWD
      FALLERND
      SPRERND
      SSIERND
      SSIIERND
      AWD_YR
      MAX.EFC
      RAP
      AWARD
      PAID
-*
BY    STU_ID
BY    SW_FUND
-*BY    COL
-*
WRITE
-*
      DEGREE
      RT120
      MJRTRANS
      AA010
      AA013
      SEX
      FST.AD260/A05    AS AD260
      FST.ADDR_TYPE_1
      MAX.CUM_GPA
      MAX.CUM_HRS
      MAX.CUM_ATT_HRS
      MAX.RB110        AS RB110
      MAX.INST_TRN
      ETHNICITY
      COL
      MAX.SA084
      MAX.RT020
-*
BY    STU_ID
BY    SW_FUND
-*BY    COL
-*
WHERE AWARD        GT 0
OR    PAID         GT 0
-*
ON    TABLE        HOLD    AS   S059DIST
-*
END
-RUN
-*
DEFINE FILE S059DIST
CTR1         /I8  = IF (STU_ID EQ LAST STU_ID) THEN 0 ELSE 1;
CTR          /I8  = IF SW_FUND EQ ' ' THEN 0 ELSE 1;
TERM1        /A05 = '&TERM';
SEM          /A01 = EDIT (TERM1, '$$$$9');
TERM2        /A05 = '&AWDYR|2';
TERM3        /A05 = '&AWDYR|3';
TERM4        /A05 = '&AWDYR|4';
TYPETERM     /A03 = '&TYPETERM';
AWARD        /P08 = IF (TYPETERM EQ 'ONE') AND (SEM EQ '1') THEN
                    FALLAWD ELSE
                    IF (TYPETERM EQ 'ONE') AND (SEM EQ '2') THEN
                    SPRAWD ELSE
                    IF (TYPETERM EQ 'ONE') AND (SEM EQ '3') THEN
                    SSIAWD ELSE
                    IF (TYPETERM EQ 'ONE') AND (SEM EQ '4') THEN
                    SSIIAWD ELSE TOT_AWD;
PAID         /P08 = IF (TYPETERM EQ 'ONE') AND (SEM EQ '1') THEN
                    FALLERND ELSE
                    IF (TYPETERM EQ 'ONE') AND (SEM EQ '2') THEN
                    SPRERND ELSE
                    IF (TYPETERM EQ 'ONE') AND (SEM EQ '3') THEN
                    SSIERND ELSE
                    IF (TYPETERM EQ 'ONE') AND (SEM EQ '4') THEN
                    SSIIERND ELSE TOT_ERND;
WEFC         /A10 = EDIT (EFC);
NEFC         /A05 = EDIT (WEFC, '99999$');
-*
-IF      &TYPETERM    EQ 'ONE'     GOTO  ONETERM  ELSE GOTO LASTTERM;
-*
-ONETERM
-*
WTERM        /A05 = '&TERM1';
YEAR         /A04 = EDIT (WTERM, '9999$');
SEM          /A01 = EDIT (WTERM, '$$$$9');
SEMDT        /A04 = DECODE SEM (1 1231
                                2 0531
                                3 0631
                                4 0731);
DATEFIX      /A08 = YEAR | SEMDT;
DATE         /I08 = EDIT (DATEFIX);
AGECALC      /I08 = IF AA010 GT 0 THEN (DATE - AA010) ELSE 0;
AGE          /A02 = EDIT (AGECALC, '$$99$');
-GOTO ENDDEF
-*
-LASTTERM
-*
WTERM        /A05 = '&TERM4';
YEAR         /A04 = EDIT (WTERM, '9999$');
SEM          /A01 = EDIT (WTERM, '$$$$9');
SEMDT        /A04 = DECODE SEM (1 1231
                                2 0531
                                3 0631
                                4 0731);
DATEFIX      /A08 = YEAR | SEMDT;
DATE         /I08 = EDIT (DATEFIX);
AGECALC      /I08 = IF AA010 GT 0 THEN (DATE - AA010) ELSE 0;
AGE          /A02 = EDIT (AGECALC, '$$99$');
-*
-ENDDEF
-*
AGERNG       /A05 = IF (AGE LE '18') THEN '00-18' ELSE
                    IF (AGE GE '19' AND AGE LE '23') THEN '19-23'
                    ELSE
                    IF (AGE GE '24' AND AGE LE '29') THEN '24-29'
                    ELSE
                    IF (AGE GE '30' AND AGE LE '39') THEN '30-39'
                    ELSE
                    IF (AGE GE '40') THEN '40+';
-*
DUM          /A01 = ' ';
-INCLUDE DYNOFFP
-*
SET    PAGE        = ON
SET    LINES       = 64
-*
TABLE FILE S059DIST
-*
HEADING CENTER
-*
"Program ID: &PRG"
-INCLUDE ACCDHEAD
"&AWDYR Fund Report and Summaries"
"Unduplicated"
-*
-IF      &TYPETERM    EQ 'ONE'     GOTO  TERM1TTL  ELSE GOTO  TERMTTL;
-*
-TERM1TTL
-*
"Term: &TERM"
-GOTO ENDTTL
-*
-TERMTTL
-*
"Terms:  &TERM1 &TERM2 &TERM3 &TERM4"
-*
-ENDTTL
-*
"  "
"  "
SUM   CTR1         NOPRINT
-*
BY    DUM          NOPRINT REPAGE
-*
SUM
-*
      STU_ID       AS ''             IN   0
      COL          AS ''             IN  10
      NEFC         AS EFC
      AWARD        AS 'Award'
      PAID         AS 'Paid'
      RAP          AS 'R,A,P'
      MAX.CUM_GPA  AS '***.,Gpa'
      AA010        AS DOB
      SEX          AS 'S,E,X'
      ETHNICITY    AS 'Ethn'
      MAX.CUM_ATT_HRS AS '***.,Att,Hrs'
-*    MAX.RT020    AS 'Att,Hrs'
-*    SA084        AS 'Ant,Hrs'
-*    MAX.CUM_HRS  AS '***.,Hrs'
      DEGREE       AS 'Degr'
      RT120        AS 'Mjr'
      AD260        AS 'Zip,Code'
      INST_TRN     AS 'High School'
-*
-IF &FUND          EQ 'ALL'       GOTO CONTX;
-*
WHERE SW_FUND      EQ '&FUND';
-*
-CONTX;
-*
BY    DUM          NOPRINT REPAGE
BY    STU_ID       AS ''
BY    COL          AS ''
-*
ON    DUM          SUBFOOT
-*
" "
"Total Students: <TOT.CTR1>"
-*
ON    TABLE        NOTOTAL
ON    TABLE        SET SPACES 1
-*
WHERE AWARD        GT 0
OR    PAID         GT 0
-*
-INCLUDE REPTDEL7
-*
END
-INCLUDE RETYPE
-RUN
-*
JOIN CLEAR *
-*
-TYPE ...CREATING SECOND REPORT
-*
TABLE FILE S059DIST
-*
PRINT
-*
      STU_ID
      COL
      SW_FUND
      AWARD
      PAID
      SEX
      ETHNICITY
      AGE
      AGERNG
      DEGREE
      RT120
      MJRTRANS
-*
-IF &FUND          EQ 'ALL'       GOTO CONTY;
-*
WHERE SW_FUND      EQ '&FUND';
-*
-CONTY;
-*
-*BY    SW_FUND
BY    STU_ID
-*BY    COL
BY    SEX
BY    ETHNIC
-*
WHERE AWARD        GT 0
OR    PAID         GT 0
-*
ON    TABLE        HOLD     AS     S059SMRY
-*
END
-RUN
-*
SET    PAGE        = ON
SET    LINES       = 64
-*
DEFINE FILE S059SMRY
STDCNT       /I05 = IF (STU_ID EQ LAST STU_ID) THEN 0 ELSE 1;
END
-*
TABLE FILE S059SMRY
-*
HEADING
-*
"Program ID: &PRG"
-INCLUDE ACCDHEAD
"<22>&AWDYR Summaries"
"<22>Unduplicated"
-*
-IF      &TYPETERM    EQ 'ONE'     GOTO  TRM1TTL2  ELSE GOTO  TERMTTL2;
-*
-TRM1TTL2
-*
"<23>Term: &TERM"
-GOTO ENDTTL2
-*
-TERMTTL2
-*
"<15>Terms:  &TERM1 &TERM2 &TERM3 &TERM4"
-*
-ENDTTL2
-*
"  "
-*
SUM
-*
      AWARD        AS 'Awarded'
      PAID         AS 'Paid'
      STDCNT       AS '# Stds'
-*
BY    COL          AS 'Col' SUMMARIZE MULTILINES      IN  15
-*
END
-RUN
-*
TABLE FILE S059DIST
-*
PRINT
-*
      STU_ID
      COL
      SW_FUND
      AWARD
      PAID
      SEX
      ETHNICITY
      AGE
      AGERNG
      DEGREE
      RT120
      MJRTRANS
-*
-IF &FUND          EQ 'ALL'       GOTO CONTSMX;
-*
WHERE SW_FUND      EQ '&FUND';
-*
-CONTSMX;
-*
BY    STU_ID
-*BY    COL
BY    SEX
BY    ETHNIC
-*
WHERE AWARD        GT 0
OR    PAID         GT 0
-*
ON    TABLE        HOLD     AS     S059SMX
-*
END
-RUN
-*
DEFINE FILE S059SMX
STDCNT       /I06 = IF STU_ID EQ LAST STU_ID THEN 0 ELSE 1;
END
-*
TABLE FILE S059SMX
-*
HEADING CENTER
-*
"Program ID: &PRG"
-INCLUDE ACCDHEAD
"&AWDYR Gender and Ethnicity Summaries"
"Unduplicated"
-*
-IF      &TYPETERM    EQ 'ONE'     GOTO  TRM1TTL3  ELSE GOTO  TERMTTL3;
-*
-TRM1TTL3
-*
"Term: &TERM"
-GOTO ENDTTL3
-*
-TERMTTL3
-*
"Terms:  &TERM1 &TERM2 &TERM3 &TERM4"
-*
-ENDTTL3
-*
"  "
"  "
-*
SUM
-*
       STDCNT       AS '# of,Stds'
       AWARD        AS 'Awarded'
       PAID         AS 'Paid'
-*ACROSS SEX          AS ''          ROW-TOTAL
-*
BY    SEX           AS 'S,E,X'
BY    ETHNICITY     AS 'Ethnicity'
BY    COL           AS 'Col'
-*
END
-RUN
-*
TABLE FILE S059SMX
-*
HEADING CENTER
-*
"Program ID: &PRG"
-INCLUDE ACCDHEAD
"&AWDYR Age Ranges Gender and Ethnicity Summaries"
"Unduplicated"
-*
-IF      &TYPETERM    EQ 'ONE'     GOTO  TRM1TTL3B ELSE GOTO  TERMTTL3B;
-*
-TRM1TTL3B
-*
"Term: &TERM"
-GOTO ENDTTL3B
-*
-TERMTTL3B
-*
"Terms:  &TERM1 &TERM2 &TERM3 &TERM4"
-*
-ENDTTL3B
-*
"  "
"  "
-*
SUM
-*
       STDCNT       AS '#of,Std'  IN 16
       AWARD        AS 'Awarded'
       PAID         AS 'Paid'
ACROSS SEX          AS ''          ROW-TOTAL
-*
BY    AGERNG        AS ''    IN  0 SUMMARIZE
BY    ETHNICITY     AS ''    IN  6
BY    COL           AS 'Col' IN 12
-*
ON    TABLE         SET SPACES 1
-*
END
-RUN
-*
DEFINE FILE S059SMX ADD
NMJR         /A11 = EDIT (MJRTRANS, '99999999999$');
END
-*
TABLE FILE S059SMX
-*
HEADING CENTER
-*
"Program ID: &PRG"
-INCLUDE ACCDHEAD
"&AWDYR Major and Gender Summaries"
"Unduplicated"
-*
-IF      &TYPETERM    EQ 'ONE'     GOTO  TRM1TTL4  ELSE GOTO  TERMTTL4;
-*
-TRM1TTL4
-*
"Term: &TERM"
-GOTO ENDTTL4
-*
-TERMTTL4
-*
"Terms:  &TERM1 &TERM2 &TERM3 &TERM4"
-*
-ENDTTL4
-*
"  "
"  "
-*
SUM
-*
       MJRTRANS     AS 'Major'
       SEX          AS 'S,E,X'
       STDCNT       AS '# of,Stds'
       AWARD        AS 'Awarded'
       PAID         AS 'Paid'
-*ACROSS SEX          AS ''
-*
BY    COL           AS 'Col'     SUMMARIZE    IN  0
BY    MJRTRANS      NOPRINT
BY    SEX           NOPRINT
-*
ON    TABLE        SET SPACES 1
-*
END
-RUN
-*
TABLE FILE S059SMX
-*
HEADING CENTER
-*
"Program ID: &PRG"
-INCLUDE ACCDHEAD
"&AWDYR Degree and Gender Summaries"
"Unduplicated"
-*
-IF      &TYPETERM    EQ 'ONE'     GOTO  TRM1TTL5  ELSE GOTO  TERMTTL5;
-*
-TRM1TTL5
-*
"Term: &TERM"
-GOTO ENDTTL5
-*
-TERMTTL5
-*
"Terms:  &TERM1 &TERM2 &TERM3 &TERM4"
-*
-ENDTTL5
-*
"  "
"  "
-*
SUM
-*
       STDCNT       AS '# of,Stds'
       AWARD        AS 'Awarded'
       PAID         AS 'Paid'
ACROSS SEX          AS ''
-*
BY    COL           AS 'Col' SUMMARIZE
BY    DEGREE        AS 'Degree' ROW-TOTAL
-*
END
-RUN
-*
DEFINE FILE S059SMRY
STDCNT       /I9  = IF STU_ID EQ LAST STU_ID THEN 0 ELSE 1;
END
-*
TABLE FILE S059SMRY
-*
HEADING
-*
"Program ID: &PRG"
-INCLUDE ACCDHEAD
"<18> &AWDYR Student Count Summary"
-*
-IF      &TYPETERM    EQ 'ONE'     GOTO  TRM1TTL6  ELSE GOTO  TERMTTL6;
-*
-TRM1TTL6
-*
"<28>Term: &TERM"
-GOTO ENDTTL6
-*
-TERMTTL6
-*
"<15>Terms:  &TERM1 &TERM2 &TERM3 &TERM4"
-*
-ENDTTL6
-*
"  "
"  "
-*
SUM
-*
       STDCNT       AS '# of,Stds'
-*
BY     COL          AS 'Col' IN 26 SUMMARIZE MULTILINES
-*
END
-RUN
-*
TABLE FILE S059DIST
-*
PRINT
-*
      STU_ID
      COL
-*
-IF &FUND          EQ 'ALL'       GOTO CONTZ;
-*
WHERE SW_FUND      EQ '&FUND';
-*
-CONTZ;
-*
BY    STU_ID
-*
WHERE 


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Virtuoso
posted Hide Post
That's a load of code. You've got 7 formatted reports (plus 63 HOLD requests). Which report has the overflow, and for which column's total?


You mention P14, but I do not see any P14 declared or defined.

AWARD and PAID are P08, which will accompdate 99,999,999.

The defined P9.2 fields in the mfd can display a max of 999,999.99; the fractional digits and the decimal point count toward the overall length of 9.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
j.gross,

Thanks for replying. Yes, it is a load of code (which I inherited - no way did I write that! Anyway, all reports that have a total at their end have the overflow. And you are correct saying you don't see any P14 declared or defined. The code you are looking at is original code. When I changed the code to P14 and got the same thing, that's when I started asking for help. You won't see a P14 anywhere in what you are seeing, because it is original code. I didn't want to have folks looking at code that was modified in case of errors on my part.

Looking forward to hearing back from you.


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Virtuoso
posted Hide Post
I don't see too many TOTALs in your code. There is one that totals a counter, and there are a few row-totals.
Please isolate the code that is offending, and post that part only, together with the master file that it uses. You posted a piece of the SWFILE master file, but that is only used to create hold files, no totals as far as I can see.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Guru
posted Hide Post
GamP,
Thanks for replying. In the code I already posted, every report I run sums both an AWARD and a PAID field, which were defined immediately before the report portions of my code. That is where my totals are.

The portion of the SWFILE master file is designed for actual data, which gets extracted along the way, creating hold files, which ultimately get used for the reports processing.

The code that is offending is in the reports section of my program.

At the risk of sounding brusque, I don't see how posting the entire Master file or copying a piece of the code from what I already posted will help. I'm not trying to sound offensive, I just don't see.

Thanks,


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Expert
posted Hide Post
Asterisks in a field always mean that the printable results won't fit in the display format given. Try giving AWARD and PAID formats as large as you can get away with, like P20 or something to see if you can rectify the situation.

Here is the syntax for a packed field. You can make it very large:

Syntax: How to Specify a Packed-Decimal Format
Pm.n
where:

m
Is the maximum number of characters to be displayed, up to a maximum of 33 positions (which include a position for the sign and decimal place). The default length is 12.2.

n
Is the number of digits that will follow the decimal point. It can be up to 31 digits.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
Thanks, Ginny...

That's what I'm playing around with as we speak. I'm even trying playing around with using decimal format, set to D10. I've run into this asterisk issue before and was successful in other programs with increasing the size of the report display field, but in the case of this program, am having no luck. I'll keep on trying, until I get it.

I appreciate your response.


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Virtuoso
posted Hide Post
WebMeister,

Don't be afraid of being brusque, I understand what you mean.

But what I'm trying to get across is that you'd best be approaching this problem piece by piece. So concentrate on the first report that produces these asterisks. Do not go any further, but in stead back up. Which is why I asked for the piece of code that generates that first report, together with it's master file, which in your case should be the master of one of the hold files, not the swfile. Look at this master file and make sure the formats and fieldnames are ok. Then take a look at the individual records of the hold file and make sure they contain the right information. Set your holddefault to alpha, so that the number-values are also readable with a plain editor. This approach must lead to some further understanding of the problem, thereby also minimizing the code to look through.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Guru
posted Hide Post
GamP,

Thanks for your understanding. And for your suggestions. I've never looked at a master file created by a hold command. How would I look at that master? Would a CHECK FILE xxxxx
work?

I understand your suggestion, but like I said I've never looked at a HOLD master.

Thanks!


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Guru
posted Hide Post
Wouldn't invalid data give you the asterisks as well?

How about trying the code out with a readlimit. Start with only a handful and increase the readlimit until you get the asterisk and then analyze the input data around that record number.

Not sure if this is gonna help, but just thought I'd throw it out there.


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Expert
posted Hide Post
?FF HOLD




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
WebM,
?FF masterfilename is surely a way to look at it. So is editing the file in a plain text editor.
You could also try to type it using some standard os command.
You could use the same approach for looking at the held data in the foctemp file, although I would just do a TABLEF FILE xxx PRINT * (possibly with recordlimit) for that.

Oh, Anatess, invalid data will most likely give you error messages - like format error and such.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Guru
posted Hide Post
To all who helped on this issue, a tremendous thank you! Don't ask why, but changing my computed fields to a size of P10 worked! I don't have any idea of why a larger size, which I originally started out trying didn't give me my desired results. Originally, I started with a P12, then went to P14, and even tried a P20, all of which did not work.

In any case, tthough, I am now getting readable results.

Again, thank you all for your willingness to help and for your valuable time - how nice of all of you to "pitch in."


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] My totals field shows only asterisks [SOLVED]

Copyright © 1996-2020 Information Builders