Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
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
ayapatsr

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

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

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: 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:
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    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 Record Not found in AlX but record re... mukun264 COBOL Programming 2 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


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