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

how to skip the steps in JCl

2 Answers   EDS,


How many days does a job remain in spool

7 Answers   Syntel,


how do you access an uncataloged dataset in a jcl?

0 Answers   IBM,


FOR a GDG, the book by 'SABA ZAMEER' says 'We can NOT ALTER the LIMIT parameter after it is defined'. (p-211). But many persons have written that it can be changed, which one is true ?

4 Answers   IBM,


I have a job called careerride and some steps in it as step1,step2. But I want to execute step2 before step1 ? How do I do that?

0 Answers  






What is one line to pass PARM from JCL to COBOL?

0 Answers  


you have one jcl .in sort step 5 files are there.if out of 5 files if one file is uncataloged or not there then how will you correct your jcl so that problem does not come. you should not create this file externally.how will u overcome it.

3 Answers  


//ERFDS JOB //STEP1 //STEP2 //STEP3...COND=(4,LT) //STEP4 1.CONDITION IN STEP3 REFERS TO WHICH STEP'S RETURN CODE (STEP1 OR STEP2)? 2.IN ABOVE PROGRAM IF CONDITION SATISFIES IN STEP3 WHICH STEPS WILL EXECUTE?? AND WHY? IF CONDITION IN STEP3 SATISFIES

5 Answers   IBM,


I HAVE A SEQUENTIAL FILE CONTAINING ONE RECORD IN WHICH I HAVE ONE FIELD AS CUSTOMER IDENTITY NUMBER FIELD WHICH IS A SIGNED FIELD. HOW TO SEQUENTIALLY INCREMENT THIS FIELD USING OVERLAY PARAMETER?.

1 Answers  


Explain how can return codes be tested before execution of a job step?

0 Answers  


What is the function of the dd avgrec keyword in sms datasets?

0 Answers  


How to empty the records in jcl

1 Answers  


Categories