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

Answers were Sorted based on User's Feedback



I have two input SORTIN files and We need to create one SORTOUT file which contains data of both i..

Answer / 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

I have two input SORTIN files and We need to create one SORTOUT file which contains data of both i..

Answer / vikas pujar

1) Sortcard to merge two files will be
//Sysin dd *
Sort fields=copy
/*

2) When try two merge two files using sort, first thing to see is they are of same length. If they are not, change the length of one equal to other in one more step which come prior to sort step.

Is This Answer Correct ?    2 Yes 1 No

I have two input SORTIN files and We need to create one SORTOUT file which contains data of both i..

Answer / srinivas yadav

any one plz write the code for this.

Is This Answer Correct ?    1 Yes 0 No

I have two input SORTIN files and We need to create one SORTOUT file which contains data of both i..

Answer / vikas pujar

Continuation to last answer. If the input files are of VB, even if length vary, files will be merged. The file with Max
RECFM and BLKSIZE will be used for output. But for FB files RECFM should be same.

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More JCL Interview Questions

I want to join to input files and write the matching fields on to an output file but i dont want the output file a sorted one

0 Answers  


If Name is NOT given for a JOB statement, then will it give error or installation will supply it for the JOB ?

1 Answers   IBM,


What is order of searching of the libraries in a JCL?

4 Answers  


in my jcl have 20 steps step1,step2,.... step20.and i have to execute step1,step2,..and skip the step3 and remaing step4,step5 are execute? i want skip step3 only? what code u can write?

3 Answers   Patni,


why do we use file-aid wht r the adv of using file-aid thn in ispf

7 Answers   HCL, Tech Mahindra,






Explain about LMCLOSE�close a data set

1 Answers  


suppose i have job it contains 10 steps after exicution of job failuer at 3 and 7 th steps i want exicute step 3 and step 7 only how we specify condition ?

5 Answers  


what operation is performed by job statement?

0 Answers   IBM,


List the different components of jcl statement?

0 Answers  


My Question is 1. How to cound no. of records in JCL. Please explain with an example. 2. How to execute only odd steps in JCL? I know EDIT TYPE = Inculde, Step Name = 1,3,5 and COND code for all even step. Anyone knows other than this.

0 Answers  


How to point my proc to production dataset always though i keep jcllib order=development.dataset? Is it possible?

3 Answers  


I have a PDS and want to omit few rows of all members of a PDS. How to do it?

6 Answers   Accenture,


Categories