|
View previous topic :: View next topic
|
| Author |
Message |
sandip_mainframe Warnings : 2 New User

Joined: 20 Sep 2006 Posts: 63 Location: pune
|
|
|
|
Hi,
I have one input file with Header, Detail, and Trailer record. There are more than one header and trailer records. I want to omit some Detail records from the file and want to update any one trailer record.
Input File -
RECFM = FB
LRECL = 1300
01 REC-TYPE PIX X(02).
88 HEADER-REC VALUE '10'.
88 DETAIL-REC VALUE '20'.
88 TRAILER-REC VALUE '90'.
Recorde to be Omited
OMIT COND=(612,02,BI,EQ,X'00')
I have used following SORT CARD but it's not working.
SORT FIELDS=COPY
OMIT COND=(612,02,BI,EQ,X'00')
OUTREC IFOUTLEN=1300,
IFTHEN=(WHEN=INIT,OVERLAY=(1301:SEQNUM,9,ZD,START=0)),
IFTHEN=(WHEN=(1,2,ZD,EQ,90),OVERLAY=(3:1301,9))
Thanks,
Sandip Walsinge. |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
What do you mean by "it's not working"?
Please post all sysouts related to "it's not working".
What does the input look like?
What does the "it's not working" output look like?
What would the output look like if it was working? |
|
| Back to top |
|
 |
sandip_mainframe Warnings : 2 New User

Joined: 20 Sep 2006 Posts: 63 Location: pune
|
|
|
|
Hi CICS Guy,
Input File looks like this -
10 20100505022141
10 20100505030941
20082010050501554914SU 120100504YS0101N777777.............
20082010050501554914SC 03120100430NS0101N777777............
20082010050501554914SC 03120100430NS0101N777777...........
20082010050501554914SM 04120100504NS0101N777777.............
20082010050501554914SC 03120100504NS0101N777777.............
.
.
.
90000007377
90000147370
In output file it's updating all trailer records, but I want update just one Trailer record.
It should update any one Trailer record from below Trailer record
90000007377
90000147370 |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
sandip_mainframe,
Assuming that you don't consider the header records as part of count and only consider the detail records, here is a job which would update the FIRST trailer record (90 in pos 1 thru 2)
| Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Your input 1300 FB file,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OMIT COND=(612,02,BI,EQ,X'00')
OUTREC IFOUTLEN=1300,
IFTHEN=(WHEN=(1,2,CH,NE,C'10'),OVERLAY=(1301:SEQNUM,9,ZD,START=0,
SEQNUM,8,ZD,RESTART=(1,2)),HIT=NEXT),
IFTHEN=(WHEN=(1,2,ZD,EQ,90,AND,1310,8,ZD,EQ,1),OVERLAY=(3:1301,9))
//* |
|
|
| Back to top |
|
 |
sandip_mainframe Warnings : 2 New User

Joined: 20 Sep 2006 Posts: 63 Location: pune
|
|
|
|
Hi Skolusu,
Thanks a lot for your help. The sort card provided by you is working.
Do you have any documentation for such a complex sort card, if you have any document or any link please post it, so that I can learn such a complex sort cards.
Thanks,
Sandip Walsinge
Pune. |
|
| Back to top |
|
 |
Escapa
Senior Member

Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
| Quote: |
Do you have any documentation for such a complex sort card, if you have any document or any link please post it, so that I can learn such a complex sort cards.
|
First thing... This is not complex sortcard...
Other thing, If you need such good examples you can have look at various posts and their answers by Kolusu\Frank. under DFSORT\ICETOOL part of the forum
That would give you fair idea of its usage.
If you are not aware of DFSORT\ICETOOL then you can start from Use [URL] BBCode for External Links |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
sandip_mainframe,
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|