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 |
Explain how can return codes be tested before execution of a job step?
Explain about User Information
what are the symbolic parameters? why do we use symbolic parameters ?
2 Answers IBM, TCS, UST, Xansa,
in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?
Explain dd statement in jcl?
GDGs can be CREATED (not COPIED) only on DASD and NOT on tape drives ? Is it True ?
Can we Execute a job without specifying Job Name in the Job Card?
Name the system library from which modules are retrieved at execution
What is the format of comment statement?
Hi, Please clear me when COND=ONLY and COND=EVEN. Explain me with example.
Name what parameter directs the output of the job log dataset?
how to run JCL thru COBOL.