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?
Answer Posted / 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 |
Post New Answer View All Answers
if the submitter of a job wants to inform another user about the job completion, how can it be done?
How does the jcl specify the job to os?
Explain how can the attributes of one sms dataset be copied to another dataset?
how to do automated restart when a job abends?
How to pass the parameter in parm using linkage section ? (syntax)?
How to find the UNIT and VOLUME of a (a) KEPT (b) UNCATALOGED and (c) CATALOGED dataset - using (i) JCL and using (ii) ISPF ?
What is concatenating?
What are the parameter we cannot use in procedure? How many instream we can write in single jcl?
What is the function of the dd dcb keyword?
Must tape dataset definitions include vol=ser specifications?
Give the syntax of job specifying jcl statement.
What is the maximum length of a single line of jcl?
My Question is 1. How to cound no. of records in JCL. Please explain with an example. 2. How to execute only odd steps in JCL? I know EDIT TYPE = Inculde, Step Name = 1,3,5 and COND code for all even step. Anyone knows other than this.
What is jcl in mainframe, and how many types of jcl statements are there for a job?
How to do automated restart when a job abend?