View previous topic :: View next topic
|
Author |
Message |
ayapatsr
New User
Joined: 01 Apr 2009 Posts: 14 Location: pune
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
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 |
|
|
|