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 alternate index?

1 Answers  


I have a JCL with 100 steps. I want run the Alternate steps in the JCL ( Like 2 ,4,6,8 etc.. ). How can I acheive this scenario? If It is by Cond Parameter can you provide the Condition code for that?

5 Answers   Polaris, Tech Mahindra, UST, Wipro,


As PARM can supply information to a program ? Can PARM be used to supply information to a cataloged or Inline Procedure also ?

2 Answers   IBM, RS Software,


i have five step in jcl.my forth step is gdg.gdg was abend.when will job complete,hoe to handle you

3 Answers   L&T, Wipro,


using cursor how can you fetch more than one record into a variable

3 Answers   Syntel,






When output dataset space is required, what quantity categories are used?

0 Answers  


How do you submit a JCL under CICS environment ?

5 Answers   Wipro,


If i have defined an temperory dataset in step2, how can i call back or use the same dataset in step5 of the same job

4 Answers   UST,


how are instream data terminated?

3 Answers   Tech Mahindra,


How can the submitting users racf authority be overridden in a job stream?

0 Answers  


What are the default system and catalog libraries in JCL?

2 Answers   Infosys,


We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?

0 Answers   IBM,


Categories