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 |
What is a PROC? What is the difference between an instream and a catalogued PROC?
Is it possible to code instream data in a PROC?
Explain how can return codes be tested before execution of a job step?
What is a S0C4 error ?
suppose i have job it contains 10 steps after exicution of job failuer at 3 and 7 th steps i want exicute step 3 and step 7 only how we specify condition ?
How is a GDG base created?
can we copy a file from fixed block to variable block and vice versa ....asap
Can a PROC CALL another PROC ? (in both Instream and Cataloged cases) ?
Suppose there r total 10 steps. Out of which i want to execute only the 7th step. How can i do that....????
Hi, can we call catalog( say myproc } proc n times in jcl if so how please explain Thanks in advance
What is the use of the utility DFSRRC00 in the JCL?
Could anyone please suggest me what is the maximum length of data that can be pass as input in //sysin dd * This was asked in interview. TIA