IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to get the record count


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ayapatsr

New User


Joined: 01 Apr 2009
Posts: 14
Location: pune

PostPosted: Thu Jan 28, 2010 5:28 pm
Reply with quote

Hi,

I had a file as below

HIN2010012703738SDNM --- Header record
11S7850586700 Y216121731N
11F7850586700 Y216121731N
11S0972707300 Y216081296N
11F0972707300 Y216081296N
11S2152089300 Y216081542N
11S2374950400 Y216032849N -- all are details records
11F2374950400 Y216032849N
11F2374950400 Y216032849N
11S1249924700 Y216031046N
11S7828480800 Y216030146N
11S5298767900 Y216078298N
11F5298767900 Y216078298N
11S6361841600 Y216086600N
11S2374950400 Y216075166N
11F2374950400 Y216075166N
11F2374950400 Y216075166N
11S2374950400 Y216075166N
11F2374950400 Y216075166N
EOF0000000020 -- Tailer record

Record copunt is 20 (EOF0000000020) Including Header & tailer.

i want to OMIT few records based on some Condition.For example i OMITED 10 records using a SORT-OMIT card.Now the record count is 10.

My Question is it possible to replace the tailer record EOF0000000020 with new record count(i.e tailer record will be EOF0000000010)?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jan 28, 2010 5:56 pm
Reply with quote

Yes, I believe that this can be done using a sort product and has probably been been asked before.

This is a link to the DFSORT smart tricks documentation which has many examples of easy ways of doing things with DFSORT.
Please click HERE to access it.

Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.

If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered. If your product is DFSORT, your topic will be moved to the DFSORT forum by one of the moderators.

If the messages start with WER or SYT then the product is SYNCSORT. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in your site.

Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY


You also need to provide more detail than you already have.
The RECFM, LRECL and DSORG of the input file, and the same for the output file.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Sat Jan 30, 2010 2:22 am
Reply with quote

Hello ayapatsr.

Based on your sample records, here is a SyncSort for z/OS job that will produce the requested output:
Code:
//S1    EXEC PGM=SORT
//SYSOUT  DD SYSOUT=*
//SORTOUT DD DSN=OUTPUT.FILE
//SORTIN  DD DSN=INPUT.FILE
//SYSIN   DD *                                     
   SORT FIELDS=COPY                               
   OMIT COND=(1,3,CH,EQ,C'EOF')                   
   OUTFIL REMOVECC,                               
     TRAILER1=(C'EOF',COUNT+1=(EDIT=(TTTTTTTTTT)))
/* 
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts To get the count of rows for every 1 ... DB2 3
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top