i have a jcl containing header body and trailer .in header i
have viswa
body 2
6
1
9
7
trailer reddy .now i need to sort only body in either
asecending or descending order how can i do it



i have a jcl containing header body and trailer .in header i have viswa body 2 6 1 ..

Answer / vadivel r

ICETOOL will help you,

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
viswa
2
6
1
9
7
reddy
/*
//OUT DD DSN=... output file
//TOOLIN DD *
* Sort detail records between the header and trailer
DATASORT FROM(IN) TO(OUT) HEADER TRAILER USING(CTL1)
//CTL1CNTL DD *
* Sort the detail records ascending by positions 14-23.
SORT FIELDS=(1,1,CH,A)
/*

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More JCL Interview Questions

What is the error code SOC01 indicate ?

5 Answers   Microsoft,


What is the difference between run mode and addressing mode?

0 Answers  


What happens if both JOBLIB and STEPLIB is specified ?

8 Answers  


there are 10 steps in jcl how to execute the steps from step2 to step8 only

6 Answers   EDS,


what happens in execution stage in job processing?

0 Answers   IBM,






Whats error code s222?

7 Answers   Patni,


I've one sequential file, that file size is LREC=100 (File contain Records like 1 to 100). Now I was increase the file size is LREC=102. My question is I want insert 00 (Two Zeros) in to the new file (That output file looks like : 00123 up to 100). How will write the SORT card in JCL. Please let me know.

2 Answers   Syntel,


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?

4 Answers  


Can I concatenate various datasets whose organization are different from each other. Lets say I want to cancatenate a PDS file, a PS file, a GDG file etc. Can You do that ?? If yes, how ? is there any separate Utility to do so ???

4 Answers  


Explain about LMCOPY -

1 Answers  


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

2 Answers   Perot Systems,


i want to avoid the positional parameter how to code it ?

3 Answers   TCS,


Categories