How do you define a sort file in JCL that runs the COBOL
program?

Answer Posted / nk

//STEP1 EXEC PGM=MYSORTPGM
//INFILE DD DSN=MY.UNSORTED.FILE,DISP=SHR
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(100,20))
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(100,20))
//OUTFILE DD DSN=MY.SORTED.FILE,
// DISP=(,CATLG,DELETE),
// UNIT=TEST,SPACE=(CYL,(100,10),RLSE),
// DCB=(DSCB.FB,LRECL=500)
SELECT SORTWK01-FILE ASSIGN TO SORTWK01.
SD SORTWK01-FILE
etc.

Is This Answer Correct ?    15 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is search and searchall?what is the diffrence between them?give an best example?

5540


What is the LINKAGE SECTION used in COBOL?

885


Name the divisions, which are available in a cobol program?

681


What are the different rules to perform a Search?

613


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

992






When is inspect verb is used in cobol?

671


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

672


Write a program to explain size error.

669


What is an in line perform? When would you use it? Anything else you wish to say about it.

641


Can we change the password using ALTER? anyone tried and changed?

1542


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1646


Write down the divisions of cobol program?

665


input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?

1868


What are the pertinent COBOL commands?

2621


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3713