how to sort two files with same sort cond n write it into two diff output files
That is to be still more clear,
i have two input files: input1 and input2
i have to sort the files with same sort condt: sort fields=copy
and need two diff output files : output1(corresponding to input1) and output2(corresponding to input2)
tis is possible with two sort steps..
but is there any way to have this process in a single sort step??
sort two files with same sort condition
Moderators: Frank Yaeger, Moderator Group
-
- Member
- Posts: 11
- Joined: Tue Nov 13, 2007 1:57 pm
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
Your explanation of what you want to do is very unclear.
Show an example of the records in each input file and the records you expect in each output file, and explain the rules for getting from input to output. Give the RECFM and LRECL of the input files. Give the starting position, length and format of each relevant field (if any).
SORT FIELDS=COPY copies the files - it does NOT sort them. So I have no idea what it is you're trying to do.i have to sort the files with same sort condt: sort fields=copy
Show an example of the records in each input file and the records you expect in each output file, and explain the rules for getting from input to output. Give the RECFM and LRECL of the input files. Give the starting position, length and format of each relevant field (if any).
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
-
- Member
- Posts: 11
- Joined: Tue Nov 13, 2007 1:57 pm
ok, here is an example:
Input file 1: Lrecl = 80
Input file 2: Lrecl = 120
Sort cond : sort field= (9,9,ch,a)
output file 1: Lrecl = 80
Output file 2: Lrecl = 120
I want to sort two different files with same sort condition and write it into two different corresponding output files..
Is there any way to do this in a single step.. instead of two steps for each file??
do u want me to be still more clear?? please do let me know
Input file 1: Lrecl = 80
Input file 2: Lrecl = 120
Sort cond : sort field= (9,9,ch,a)
output file 1: Lrecl = 80
Output file 2: Lrecl = 120
I want to sort two different files with same sort condition and write it into two different corresponding output files..
Is there any way to do this in a single step.. instead of two steps for each file??
do u want me to be still more clear?? please do let me know
anu
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
You can do it in one step with DFSORT's ICETOOL as follows (but it will take two passes):
Code: Select all
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1 (FB/80)
//IN2 DD DSN=... input file2 (FB/120)
//OUT1 DD DSN=... output file1 (FB/80)
//OUT2 DD DSN=... output file2 (FB/120)
//TOOLIN DD *
SORT FROM(IN1) TO(OUT1) USING(CTL1)
SORT FROM(IN2) TO(OUT2) USING(CTL1)
/*
//CTL1CNTL DD *
SORT FIELDS=(9,9,CH,A)
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
its a really good
hi
this is really a good thing to improve the knowledge.
i am a fresher so its very good site for me.
this is really a good thing to improve the knowledge.
i am a fresher so its very good site for me.
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page