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

Answer Posted / rik

YOU HAVE TO SIMPLY WRITE THE FOLLOWING CODE IN YOUR JCL :

//STEP1 EXEC PGM=SUPERSRT
//SORTIN DD DSN=TEST001.INFILE,DISP=SHR
//SORTOUT DD DSN=TEST001.SORTED,DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// UNIT=WORK,SPACE=(TRK,5,2),RLSE)
//SYSIN DD *
SORT FIELDS=(16,05,ZD,A)
/*

THE CONTAINT OF THE TEST001.INFILE WILL BE COPPIED TO
TEST001.SORTED FILE AND THIS TEST001.SORTED FILE WILL BE
SORTED IN ASCENDING ORDER OF THE CONTAINT OF FIELD POSITION
16 TO 20..

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to move the records from file to array table. give with code example

2216


How do get the result of your program directly on your pc?

1878


i need a small 3d program using inline and outline.

1629


what is difference between cobol and cobol/400

21556


I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.

2005






How do you reference the following file formats from cobol programs?

693


what are decleratives in cobol?

1827


i want a program using by if, evaluate , string, unstring, perform, occurs?

4046


What are the different rules to perform a Search?

613


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2728


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2052


What type of SDLC u followed? Why?

1516


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

681


How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?

700


How do you differentiate between cobol and cobol-ii?

651