I have two input SORTIN files and We need to create one
SORTOUT file which contains data of both input files. What
is the SortCard for this?. Suppose the length of the both
files are different, then How we do it? Please reply ASAP

Answer Posted / srk

//jobname job .......
//stepname1 exec pgm=sort
//sysprint dd sysout=*
//sortin01 dd dsn=file1,disp=shr
//sortin02 dd dsn=file2,disp=shr
//sortout dd dsn=mergefile,.......
//sysout dd sysout=*
//sysin dd *
merge fields=(starting field,length,merge-sequence,format)

/*
*above is the merge condition
//

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you understand by the term job time – out and how can you overcome that?

608


What parameter of the job statement is used to limit the cpu time consumed by the job?

845


How to run cobol program using jcl?

660


What is the function of the dd avgrec keyword in sms datasets?

843


what is the use of JCL?

666






1) SORT FIELDS=(20,4,CH,D,10,3,CH,D) OUTREC FIELDS=(7:20,4,C' FUTURE ',20,2,10,3,1Z,1,9,13,7, 24,57,TRAN=LTOU,6X'FF') This example illustrates how a fixed-length input data set can be sorted and reformatted for output. The SORTIN LRECL is 80 bytes. The reformatted output records are fixed length with a record size of 103 bytes. SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is specified or available, it will automatically be set to the reformatted record length of 103. in the above example i have some doubts that a) sort fields=(20,4,CH,D,10,3,CH,D) -what exactly it does and this fields related to output record fields or input record fields b)outrec used to refprmat the records after sorting that means could please reply me as soon as possible Thanks. Venkat

7093


What is the use of disp parameter?

653


How do you submit a job for execution?

640


Step 1 RC 4 Step 2 Step 3 I want to know the COND parameter which can be coded in step 2 or 3. Step 2 should be executed based on Step 1 RC and Step 3 should not be executed based on step 1's RC

882


Are there any set of rules for the names of the steps used in a job?

639


How to pass the parameter in parm using linkage section ? (syntax)?

655


How do you overcome this limitation ?

702


what JCL Procedures?

703


What do you understand by the terms: joblib and steplib?

626


What are the parameters that are used in creating a gdg?

743