Page 1 of 1

Order of input records shouldn't be changed

PostPosted: Thu Jul 12, 2012 8:55 pm
by Hariprasad K
Hi,

I would like to do a sort such that the order of input records shouldn't be changed. (copying one file data into anoterh file).

Thanks,
Hariprasad.K

Re: Order of input records shouldn't be changed

PostPosted: Thu Jul 12, 2012 8:59 pm
by enrico-sorichetti
read in the DFSORT manuals about the COPY function

or if You are really SORTING and want to preserve the sequence for records with the same <sort key> about the OPTION EQUALS

Re: Order of input records shouldn't be changed

PostPosted: Thu Jul 12, 2012 10:06 pm
by NicC
or use a copy utility such as IEB/ICEGENER

Re: Order of input records shouldn't be changed

PostPosted: Thu Jul 12, 2012 10:11 pm
by skolusu
Hariprasad K,

Use the following DFSORT JCL
//STEP0100 EXEC PGM=SORT       
//SYSOUT   DD SYSOUT=*         
//SORTIN   DD DSN=Your input file,DISP=SHR
//SORTOUT  DD DSN=Your output file,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD *                 
  SORT FIELDS=COPY             
//*