Suppose I have a file with three fields with data in the
following format
1. empid - S9(4) COMP
2. empname - X(20)
3. empsal - S9(5)V(2) COMP-3
If I view this file, it will not be in a readable format.
How to display the empid and empsal fields in a readable
format without using COBOL program? What kind of SORT card
will have to be coded?
Answer Posted / bharathi
We can use a SORT utility in JCL. In the SYSIN DD statement, we need to use the OUTREC FIELDS in the below format,
//SYSIN DD *
SORT FIELDS = COPY
OUTREC FIELDS =(1,4,BI,TO=ZD,
5,20,
21,4,PD,M4)
/*
NOTE - Please refer the below link (Chapter 5) for reformatting records using SORT.
http://publibz.boulder.ibm.com/epubs/pdf/ice1cg30.pdf
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
by using cond parameter maximum 8 cond can be coded in single cond means ?explain
What is NOTCAT ?
Brief description of inline procedure of jcl.
How can the attributes of one sms dataset be copied to another dataset?
what is DD statement is used in JCL?
What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?
For what purpose steplib and joblib are used ?
which utility is used a dummy utility?
What is the function of the steplib dd statement?
in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?
how you will the direct the data to spool using sysout option?
what is the JCL statement consists of?
How does the jcl specify the job to os?
What are the difference between jcl and jes?
I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.