Closing the File-AID 'IF' Statement in JCL



Compuware's data management products: File-AID for IMS, File-AID/MVS, File-AID for DB2 and DBA-XPERT for DB2

Closing the File-AID 'IF' Statement in JCL

Postby tander » Thu Apr 15, 2010 9:33 pm

Hi There,

I am having trouble getting some File-AID JCL to work.

The JCL tallies balances, and sums 1 or 0 flags.

I am not sure what marks the end of an 'IF' statement so I really have no control over what gets executed and what does not.

I thought line breaks indicated what went inside a conditional 'IF'-block. In the JCL I created, my conditional statments appear after an IF. Each statement on a new line is meant to execute unconditionally...but this isn't happening.

Does anyone know how I should indicate the end of a File-AID 'IF'? If so, please let me know how I can correct this code.

Much Thanks,

-Tom

Here is the JCL,

//**********************************************************************
//STEP00   EXEC PGM=FILEAID
//DD01     DD DSN=AXA.FINANCE.DATASET.TEST,
//            DISP=OLD
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSLIST  DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSIN    DD *
$$DD01 TALLY ACCUM=(29,'CURRENT BALANCE'),
             IF=(39,EQ,P'1'),ACCUM=(29,'CHARGED OFF BALANCE'),
             IF=(39,NE,P'1'),ACCUM=(29,'NET BALANCE'),
             IF=(39,EQ,P'1,0'),ACCUM=(41,'RECORD COUNT'),
             IF=(39,EQ,P'1'),ACCUM=(39,'CHARGED OFF ACCOUNTS'),
             IF=(40,EQ,P'1'),ACCUM=(40,'NET ACCOUNTS'),
             IF=(35,EQ,P'1'),ACCUM=(40,'FORMAT-1 RECORDS'),
             IF=(36,EQ,P'1'),ACCUM=(40,'FORMAT-2 RECORDS'),
             IF=(37,EQ,P'1'),ACCUM=(40,'FORMAT-3 RECORDS'),
             IF=(38,EQ,P'1'),ACCUM=(40,'FORMAT-4 RECORDS'),
             IF=(39,EQ,P'1,0'),ACCUM=(41,'BASE SEGMENTS'),
             ACCUM=(42,'HIGH RISK SEGMENTS'),
             ACCUM=(43,'CL PROD SMALL SEGMENTS'),
             ACCUM=(44,'CL PROD MEDIUM SEGMENTS'),
             ACCUM=(45,'CL PROD LARGE SEGMENTS'),
             ACCUM=(46,'CL PROD XLARGE SEGMENTS'),
             ACCUM=(47,'SLS SEGMENTS'),
             ACCUM=(48,'ALP SEGMENTS'),
             ACCUM=(49,'HISTORY SEGMENTS'),
             ACCUM=(50,'BEHAVIOR SEGMENTS'),
             ACCUM=(51,'MONETARY SEGMENTS'),
             ACCUM=(52,'DELINQUENT SEGMENTS')
/*
tander
 

Re: Closing the File-AID 'IF' Statement in JCL

Postby tander » Tue Apr 20, 2010 12:14 am

Hi All,

I've found I can get the results I want by making sure every line, except the first ACCUM, has an if statement.

For ACCUMs that I want to execute for every records, I just use an if condition that is always true.

But if there is a way to separate the accum statements so they execute for every record without the extra statement I would be curious to know it.

Haven't found any examples in File-Aid documentation so far.

Thanks,

$$DD01 TALLY ACCUM=(29,'CURRENT BALANCE'),                           
             IF=(39,EQ,P'1'),ACCUM=(29,'CHARGED OFF BALANCE'),       
             IF=(39,NE,P'1'),ACCUM=(29,'NET BALANCE'),               
             IF=(39,EQ,P'1,0'),ACCUM=(41,'RECORD COUNT'),           
             IF=(39,EQ,P'1'),ACCUM=(39,'CHARGED OFF ACCOUNTS'),     
             IF=(40,EQ,P'1'),ACCUM=(40,'NET ACCOUNTS'),             
             IF=(35,EQ,P'1'),ACCUM=(35,'FORMAT-1 RECORDS'),         
             IF=(36,EQ,P'1'),ACCUM=(36,'FORMAT-2 RECORDS'),         
             IF=(37,EQ,P'1'),ACCUM=(37,'FORMAT-3 RECORDS'),         
             IF=(38,EQ,P'1'),ACCUM=(38,'FORMAT-4 RECORDS'),         
             IF=(39,EQ,P'1,0'),ACCUM=(41,'BASE SEGMENTS'),           
             IF=(39,EQ,P'1,0'),ACCUM=(42,'HIGH RISK SEGMENTS'),     
             IF=(39,EQ,P'1,0'),ACCUM=(43,'CL PROD SMALL SEGMENTS'), 
             IF=(39,EQ,P'1,0'),ACCUM=(43,'CL PROD SMALL SEGMENTS'), 
             IF=(39,EQ,P'1,0'),ACCUM=(44,'CL PROD MEDIUM SEGMENTS'),
             IF=(39,EQ,P'1,0'),ACCUM=(45,'CL PROD LARGE SEGMENTS'), 
             IF=(39,EQ,P'1,0'),ACCUM=(46,'CL PROD XLARGE SEGMENTS'),
             IF=(39,EQ,P'1,0'),ACCUM=(47,'SLS SEGMENTS'),           
             IF=(39,EQ,P'1,0'),ACCUM=(48,'ALP SEGMENTS'),           
             IF=(39,EQ,P'1,0'),ACCUM=(49,'HISTORY SEGMENTS'),       
             IF=(39,EQ,P'1,0'),ACCUM=(50,'BEHAVIOR SEGMENTS'),       
             IF=(39,EQ,P'1,0'),ACCUM=(51,'MONETARY SEGMENTS'),       
             IF=(39,EQ,P'1,0'),ACCUM=(52,'DELINQUENT SEGMENTS')     
tander
 

Re: Closing the File-AID 'IF' Statement in JCL

Postby dick scherrer » Tue Apr 20, 2010 1:06 am

Hello,

Good to hear you have something working - thanks for the followup :)

You might try an experiment and move one of the "every record" accums before the first IF and see what happens. . . If the one works correctly, relocate all of them. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Closing the File-AID 'IF' Statement in JCL

Postby tander » Fri Apr 23, 2010 8:43 pm

Yes, shifting the 'Every Record Accums' before the conditional ones also works - thanks again!

- Tom
tander
 

Re: Closing the File-AID 'IF' Statement in JCL

Postby dick scherrer » Sat Apr 24, 2010 12:25 am

You're welcome - thank you for letting us know it is working :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to File-AID

 


  • Related topics
    Replies
    Views
    Last post