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: 22
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10350
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: 1922
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: 22
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 Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
No new posts Selecting a row from multiple tables! Vignesh Sid DB2 2 Thu Oct 26, 2017 6:09 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am

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