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?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / santhosh
That answer was correct. Except that the byte position for the first COMP field will be 2. Not 4. It was a great answer.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / zos13
One quick response :
To read Emp-sal (Comp-3 field), please use HEX ON.
I am not sure for emp-id, binary. Please try and let everyOne know here.
Thnx
Garry.
Is This Answer Correct ? | 0 Yes | 0 No |
State the uses of syspring, sysin, sort fields, sum fields and dummy.
what is the purpose of coding notify parameter in job statement?
what is the use of temporary files?
How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
i) Difference between ps, esds, ii) Difference between lrecl, blksize among PS, PDS issues? i.e in jcl at dcb
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
What do you feel makes a good program?
What is concatenating?
how will be submit 1 jcl by other jcl? means that how 'll submit one job by other job??
What is the meaning of keyword in JCL? What is its opposite?
what is JCLLIB and PROCLIB in jcl and their syntax
Can we DELETE all the Generations of a GDG at once, WITHOUT deleting the GDG itself ?