Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8657
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 VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts Creation of Datasets dynamically on t... Raghu M N DFSORT/ICETOOL 8 Fri Mar 16, 2018 12:56 am
No new posts Copying only first and last word from... chandan.inst SYNCSORT 4 Wed Jan 31, 2018 4:19 pm
No new posts How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm

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