Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in


How to get the record count

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message

New User

Joined: 01 Apr 2009
Posts: 14
Location: pune

PostPosted: Thu Jan 28, 2010 5:28 pm    Post subject: How to get the record count
Reply with quote


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


Global Moderator

Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jan 28, 2010 5:56 pm    Post subject:
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.

//SYSIN    DD *

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


Joined: 25 Jul 2007
Posts: 500
Location: USA

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

Hello ayapatsr.

Based on your sample records, here is a SyncSort for z/OS job that will produce the requested output:
//SYSIN   DD *                                     
   SORT FIELDS=COPY                               
   OMIT COND=(1,3,CH,EQ,C'EOF')                   
   OUTFIL REMOVECC,                               
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1


Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm

Back to Top
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us