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

hi in one of the interview one asked me how to submit a job from cobol?as well as how to submit a jcl from CICS? can u pls any one tell me..

1 Answers   CTS,


can we maintain 2 generations with different Lengths in Same GDG ?

3 Answers   RBS,


how can we merge two input files from two different jobs into one output file ? Please ans any one ASAP?

1 Answers  


I have 5 steps in my jcl ,I need to execute first three steps and then 2nd step again ,4th and 5th steps if rc of 2nd step is zero

1 Answers   ABC,


A statement about PROCs is " In PROCs, Symbolic Parameters can be assigned on PROC and EXEC", BUT On which EXEC, (i) On the JCL's EXEC which is calling to PROC1. (Inside JCL, EXEC PROC1) (ii) or On the PROC's EXEC where it calls the PGM1. (Inside PROC, EXEC PGM=PGM1)

1 Answers   IBM,






describe the job statement, its meaning,syntax and significant keywords?

1 Answers  


I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?

3 Answers   Wipro,


What does a disposition of (NEW,CATLG,KEEP) mean?

1 Answers   Cap Gemini,


How do you override a parameter in Positional parameters?

4 Answers   Thomson Reuters,


Explain the jcl exec statement?

0 Answers  


When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?

0 Answers  


What are isolation levels? Where do we need to specify them in compiling JCL?

3 Answers  


Categories