Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Updating multiple counts in trailer!!

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
Vignesh Sid

New User


Joined: 04 Sep 2017
Posts: 33
Location: India

PostPosted: Mon Nov 06, 2017 1:04 pm    Post subject: Updating multiple counts in trailer!!
Reply with quote

Hi all,

I have an input file

ACTION
ENT
ENT
ENT
GROUP
GROUP
RESOURCE
RESOURCE
"ENDOFDATA","RECORDCOUNT={TOTCNTXXXX};PRINCIPAL_RECORDCOUNT={0};GROUP_RECORDCOUNT={8657};ACTION_RECORDCOUNT={1};ACTIONGROUP_RECORDCOUNT={0};RESOURCE_RECORDCOUNT={RESCNTXXXX};RESOURCEGROUP_RECORDCOUNT={0};PRINCIPALID_COUNT={0};COMITID_COUNT={0};PRINCIPALGROUP_COUNT={GRPCNTXXXX};PRINCIPALROLE_COUNT={GRPCNTXXXX};ACTION_COUNT={1};ACTIONGROUP_COUNT={0};RESOURCE_COUNT={RESCNTXXXX};RESOURCEGROUP_COUNT={0};RESOURCE_PRODUCT_RECORDCOUNT={0};RESOURCE_PRODUCT_COUNT={0};RESOURCE_PRODUCT_GROUP_RECORDCOUNT={0};RESOURCE_PRODUCT_GROUP_COUNT={0};RESOURCE_ACCOUNT_RECORDCOUNT={0};RESOURCE_ACCOUNT_COUNT={0};RESOURCE_ACCOUNT_GROUP_RECORDCOUNT={0};RESOURCE_ACCOUNT_GROUP_COUNT={0};ENTITLEMENT_RECORDCOUNT={ENTCNTXXXX};ENTITLEMENT_COUNT={ENTCNTXXXX};"

Here end of data is the trailer record where the count needs to be updated. Here count needs to be updated at 8 locations through four variables (TOTCNTXXXX, GRPCNTXXXX, RESCNTXXXX and ENTCNTXXXX).

TOTCNTXXXX - Total count of input file (Here 8)
GRPCNTXXXX - Total count of group (Here 2)
RESCNTXXXX - Total count of resource (Here 2)
ENTCNTXXXX - Total count of ENT (Here 3)

This file is of record length 850 and FB. Could anyone help me with a sort to overlay the above counts in the end of data record at corresponding positions?

Thanks,
Viky.
Back to top
View user's profile Send private message

enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10515
Location: italy

PostPosted: Mon Nov 06, 2017 2:54 pm    Post subject: Reply to: Updating multiple counts in trailer!!
Reply with quote

searching the forums with "overlay trailer" returned about 120 hits
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2091
Location: UK

PostPosted: Mon Nov 06, 2017 4:13 pm    Post subject:
Reply with quote

I would suggest that you:
a) follow up Enrico's information
b) provide a record layout of the relevant record and what needs to be done to which field as what you have supplied is 'rubbish'
Back to top
View user's profile Send private message
Vignesh Sid

New User


Joined: 04 Sep 2017
Posts: 33
Location: India

PostPosted: Mon Nov 06, 2017 4:47 pm    Post subject:
Reply with quote

Shall I use the following sort card:

Code:
//SORT12  EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD DSN=input1,DISP=SHR         
//         DD DSN=input2,DISP=SHR             
//SORTOUT  DD DSN=TETEST.W.TELECASH.TEST.CEEPFIL1,                   
//            DISP=(OLD,CATLG,DELETE),UNIT=SYSDA,                     
//            DCB=(RECFM=FB,LRECL=850,BLKSIZE=0),                     
//            SPACE=(CYL,(500,500),RLSE)                             
//SYSIN DD *                                                         
  OUTFIL FNAMES=SORTOUT,IFTRAIL=(TRLID=(2,3,CH,EQ,C'END'),           
  TRLUPD=(27:COUNT=(M11,LENGTH=10),                                   
    169:COUNT=(2,3,CH,EQ,C'RES',M11,LENGTH=10),                       
    274:COUNT=(2,3,CH,EQ,C'GRO',M11,LENGTH=10),                       
    629:COUNT=(2,3,CH,EQ,C'ENT',M11,LENGTH=10)))                     
/*

For the above query I get the following error:
Code:
  OUTFIL FNAMES=SORTOUT,IFTRAIL=(TRLID=(2,3,CH,EQ,C'END'),                   
  TRLUPD=(27:COUNT=(M11,LENGTH=10),
                                                             *
    169:COUNT=(2,3,CH,EQ,C'RES',M11,LENGTH=10),                                         
    274:COUNT=(2,3,CH,EQ,C'GRO',M11,LENGTH=10),                               
    629:COUNT=(2,3,CH,EQ,C'ENT',M11,LENGTH=10)))                             
WER813I  INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED               
WER268A  OUTFIL STATEMENT  : SYNTAX ERROR                                     
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE


Coded for you - next time do it yourself
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Mon Nov 06, 2017 6:26 pm    Post subject:
Reply with quote

add a ,?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need help on the multiple files refor... wik123 DFSORT/ICETOOL 7 Wed Sep 19, 2018 10:47 am
No new posts Delete Multiple rows in chunks by usi... dharmaraok DB2 5 Tue Sep 11, 2018 8:44 pm
No new posts Merge two files and sum up the count ... preeti6 JCL & VSAM 6 Thu Sep 06, 2018 10:57 am
No new posts Concatenaing multiple rows to single ... Vignesh Sid DFSORT/ICETOOL 1 Tue Aug 14, 2018 8:59 am
No new posts CA SYSVIEW - MQTHRESH updating dynami... Anilkumarmq CA Products 2 Fri Jun 08, 2018 2:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us