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
What are the utility programs in jcl?
What are the parameter we cannot use in procedure?
WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99 VALUE 123.45. PROCEDURE DIVISION. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. compiler : IGYGR1080-S A "VALUE" clause literal was not compatible with the data category o subject data item. The "VALUE" clause was discarded. WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99. PROCEDURE DIVISION. MOVE 123.45 TO W-B. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. 2375
What does a disposition of (new,catlg,keep) for a dsn mean?
What is the purpose of the dd keylen parameter?
a set statement is used to define commonly used symbolic across job steps or procedures. It initializes the previous values in the symbolic names. It has to be defined before the first use of the symbolic names in the jcl. State whether true or false?
How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?
How gdg are concatenated?
whats the diff bw the evaluate also and and?
Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?
Explain about LMQUERY�give a dialog information about a data set
What is the function of the dd dcb keyword?
how you can access an uncataloged dataset in a JCL?
how you can direct the data to spool using SYSOUT option?
Explain the function of a dd statement?