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 about REXX
What is the purpose and meaning of the REGION keyword and what JCL statement is it associated with?
how are instream data terminated?
Suppose I have 5 dataset listed under a single DD name in a catlogued PROC. How can I override one of those 5 dataset (say 3rd dataset)?
What is a Proc ? why do we go for a Proc ? What are the types of procs?Can we have nesting in Procs ?
How to identify where file is empty or not? How many ways are there to identifying?
what is A-MODE and R-MODE?
How we can code in a jcl to execute a job in a particular time and date without using any job shudular?. (Eg) i want to execute a particular job at 8 am on 01/01/2010.
what is JCL?
Can anyone tell me the syntax for printing two files at two different destinations in a single step?
What are the utility programs in jcl?
//ERFDS JOB //STEP1 //STEP2 //STEP3...COND=(4,LT) //STEP4 1.CONDITION IN STEP3 REFERS TO WHICH STEP'S RETURN CODE (STEP1 OR STEP2)? 2.IN ABOVE PROGRAM IF CONDITION SATISFIES IN STEP3 WHICH STEPS WILL EXECUTE?? AND WHY? IF CONDITION IN STEP3 SATISFIES