Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



Suppose I have a file with three fields with data in the following format 1. empid - S9(4) COMP ..

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

Suppose I have a file with three fields with data in the following format 1. empid - S9(4) COMP ..

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

Suppose I have a file with three fields with data in the following format 1. empid - S9(4) COMP ..

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

Suppose I have a file with three fields with data in the following format 1. empid - S9(4) COMP ..

Answer / zos13

You may use EDIT Mask !!!

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JCL Interview Questions

what is a steplib

4 Answers   CGI,


Which dd parameters are required?

0 Answers  


How jcl work to handle various input output file operations?

0 Answers  


How do you handle empty files in a JCL ?

3 Answers   Wipro, Xansa,


Is there a way to check for an empty file in JCL other than using IEBCOMPR and the command PRINT COUNT(1)?

8 Answers  


How to pass the temp dataset form one JOB step to another?

6 Answers   IBM,


Explain the purpose of the dd keylen parameter?

0 Answers  


have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file

0 Answers  


WHAT IS DUMMY IN JCL? HOW TO USE IT? CAN ANYBODY SEND PROGRAM ON THIS?

3 Answers  


What is the error/SOC code if dd names are not sysut1 and sysut2 in IEBGENER?

1 Answers   CTS,


How do you check the syntax of a JCL without running it?

17 Answers  


I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?

0 Answers  


Categories