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 |
I have 5 steps in my job. say s1, s2, s3, s4, s5 //s1 exec ............. //s2 exec ............ //s3 exec .......... //s4 exec ........ //s5 exec ............... my question is i want to exeute only s2 and s4 steps... please advice me how to do this:
Min no of member?s (PDS) in one directory block?
Please explain with syntax and an example, the Inrec fields and Outrec build in sort.
what is JCL?
What is a GDG
How To get the last record in VSAM file in cluster? and How can u get the ksds file records into ur cobol program ? Pls tell me about these two questions.
what is force complete
What is S322 abend ?
how would you create a temporary dataset? And where will you use them?
how to compress the data set
If the proc stepname is excluded while overriding the COND, TIME, REGION and PARM parameters while calling the proc, will the override only apply to the first step in the proc or all the steps for all the above parameters?
what is the difference between static call and dynamic call?