View previous topic :: View next topic
|
Author |
Message |
rsm_deepak
New User
Joined: 06 Apr 2005 Posts: 30 Location: visakhapatnam
|
|
|
|
I need to do the following
1) The record having record length 500 and the key is 60-66 position of the record.
2) Take all the 60-66 position from the record, sort them
3) remove the duplicates(60-66).
4) write only 60-66 into the output file
This I need to do by sort only. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi there,
You can use following sort statements:
Code: |
//SYSIN DD *
SORT FIELDS=(60,7,CH, A)
SUM FIELDS=NONE
OUTFIL OUTREC=(1:60,7)
/* |
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Actually, this DFSORT job would be more efficient since it sorts less data:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/500)
//SORTOUT DD DSN=.. output file (FB/7)
//SYSIN DD *
INREC FIELDS=(60,7)
SORT FIELDS=(1,7)
SUM FIELDS=NONE
/*
|
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 |
|
|
|