View previous topic :: View next topic
|
Author |
Message |
dineshsjce Currently Banned New User
Joined: 16 Apr 2007 Posts: 41 Location: Bangalore
|
|
|
|
Dear Friends,
I have two input files one with the reord length of 130 and the other with the record length of 135. I have to sort these input files and the output file record length needed is 135. How can I do this ? Can this be done using simple SORT utility ?
Thank You in advance. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What are the RECFM of the files.
What are the sort keys of the files. |
|
Back to top |
|
|
dineshsjce Currently Banned New User
Joined: 16 Apr 2007 Posts: 41 Location: Bangalore
|
|
|
|
The RECFM is FB.
and the SORT key is (1,1,A,61,16,A,121,1,A). |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use a DFSORT/ICETOOL job like the following:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1 (FB/130)
//IN2 DD DSN=... input file2 (FB/135)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file (FB/135)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1)
SORT FROM(T1) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
INREC OVERLAY=(135:X)
/*
//CTL2CNTL DD *
SORT FIELDS=(1,1,A,61,16,A,121,1,A),FORMAT=BI
/*
|
|
|
Back to top |
|
|
|