wht r different types of sort fields in jcl ?



wht r different types of sort fields in jcl ?..

Answer / pullareddy

1. SORT FIELDS=COPY ===> To copy all the records from
SORTIN to SORTOUT.
2. SORT FIELDS=COPY,SKIPREC=100,STOPAFT=5 ===> TO copy the
records from 100 to 105.
3. SORT FIELDS=(STARTPOS,LENGTH,TYPE,ASC/DESC) ===> TYPE
can be: ZD(zoned decimal), CH(Charecter),BI(Binary),PD
(Packed decimal), and FS(Signed numbers).
4. INCLUDE COND=(STATPOS,LENGTH,TYPE,RO,VALUE) EX: INCLUDE
COND=(1,5,CH,EQ,C'PULLA) ===> To select the paticlular
record. same as above to omit the record replace INCLUDE
with OMIT.
5. INREC FIELDS=(15,5,6,6) ===> to restructure the input
file before feeding to sort.
6. OUTREC FIELDS=(1:1,20,21:C'PULLA',26:10Z,36:21,10) ===>
First 20 chars from input file followed by character PULLA
followed by 10 zeros followed by characters from 21 to 10
characters of input. the same can be codded as bellow.
OUTREC FIELDS=(1,20,C'PULLA',10Z,21,10).
7. SORT FIELDS=(1,5),EQUALS
SUM FIELDS=NONE ===> TO remove the duplicates in the key
field(1,5).

Is This Answer Correct ?    47 Yes 4 No

Post New Answer

More JCL Interview Questions

when GDG version number get changed ? bcz always Generations only increasing.

1 Answers   Cap Gemini,


How can a stopped job be started again?

0 Answers  


If a JOBSTEP abends, AND without using COND also, all the subsequent steps execute, then what is the use of using EVEN ? Why do we use EVEN when without it also all the JOBSTEPs execute ?

2 Answers   IBM,


I've one sequential file, That file contains millians of Junk & CHAR recoreds example File 1 ,,,,,...,,,.....,.,.INFOSYS.....,,,,,,,,,,,WIPRO..........., ,...,..,. My questions is : I want omit the 44th posstion to 4 CHAR (WIPRO) remaining things I want output file (including Junk CHAR also)... How can we slove this problem & give me a syntax. Please provide the result as soon as possible.

5 Answers   CTS,


If a jcl has just 1 step and the input file to this does not exist, then what will happen if we submit this job?

3 Answers  






how to solve u4038 abbend?........

3 Answers   Atos Origin, TCS,


if in a job, region is mentioned in both jobcard and in step then which is cosidered at the step level? A job has region 4k in jobcard and step1 with region 0k and step2 with 16k, then what is the region allocated for the entire job? what is the region step1 takes? what is the region step2 takes?

4 Answers  


Explain how can the disposition of sysout datasets be set for an entire jobstream?

0 Answers  


I have GDG defined e.g. GDG.smaplegdg.base, after processing the GDG. it contains some records and which is input to the second step2. How can I use GDG to use it as input file at step2.

3 Answers   Wipro,


in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?

0 Answers   IBM,


hi iam learning mainframes,can anybody tell me how to check JCL errors.(after submiting the JCL we have check in spool or is there any other method)

8 Answers  


Can we write same stepname for one or more steps in on job ?

2 Answers  


Categories