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

How much space OS allocates when you create a PS or PDS?

4 Answers  


Whats error code s222?

7 Answers   Patni,


What are the utility programs in jcl?

0 Answers  


I have 5 generations in my GDG. How do I code in the JCL to consider all the 5 versions of the GDG ?

5 Answers   Xansa,


Suppose a proc step has a DD statement like //ABC DD DSN=TEST.FILE1,DISP=SHR DSN=TEST.FILE2,DISP=SHR and the above DD name is overridden from the JCL as given below //procstepname.ABC DD DSN=TEST.FILE3 - Will the DD statement now have just TEST.FILE3 or it will be TEST.FILE3 and TEST.FILE2? Suppose if it is overridden twice like //procstepname.ABC DD DSN=TEST.FILE3 //procstepname.ABC DD DSN=TEST.FILE4 Will this give a JCL error? If not, what will be final output?

2 Answers  


if my GDG limit has been kept as 50 and if am trying to put 60 records.what would happen. will there be any abend for this scenario

4 Answers  


How jcl is used for testing batch programs?

0 Answers  


suppose i have 10 job steps and i want to execute only step 6.How to write?

6 Answers  


What is the motivation behind coding class parameter in job statement?

0 Answers  


How do you create a temporary dataset?

0 Answers  


i have a jcl calling proc which has 10 steps, i want to execute from step5 to step10, where can i code RESTART and COND parameter?

4 Answers   IBM,


01 A. 10 B pic X(10). move spaces to A. move spaces to B. output in A & B

2 Answers   Perot Systems,


Categories