Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


I have one GDG.
Everyday One new version is being created.Now I want to
split this created version in different files each having
1000 records.
Here Problem is I don't know How many records will be there
in new version of GDG?
that's why I don't know How many Out files we need to use .

Interesting??????????????

Answers were Sorted based on User's Feedback



I have one GDG. Everyday One new version is being created.Now I want to split this created versio..

Answer / ashl

Write a Clist that will take the input file read the first 1000 records and create
an output file. After 1000 records are created the next record should be
written to a new file. The Clist can allocate files during execution.

The timing of the file allocation will be handled logically by the program.
Keep a counter, once it reaches 1000, initialize the variable and and create a
new file.

The output file names will vary with each file.

Execute the Clist as a step in your job and once the step completes the
output should be different files with 1000 records.

Is This Answer Correct ?    5 Yes 0 No

I have one GDG. Everyday One new version is being created.Now I want to split this created versio..

Answer / xx

Give your GDG base in the i/p DD name of SORt step. Use
SPLIT parameter in SORT to complete the task. When you use
GDG base all generation of that GDG will be considered.

Is This Answer Correct ?    4 Yes 0 No

I have one GDG. Everyday One new version is being created.Now I want to split this created versio..

Answer / shridhar

STEP001 : Selcopy/utility to count no of records in GDG.
Just mention GDG base in input to include all versions.

STEP002 : REXX step. define a stem of 1000. read input
batch of 1000 records or if not 1000 then for actual count.
Alloc a new file dynamically. Write these no of records.
Reduce actual count by no of records written.
Repeat procedure untill no of records <= 0.

Is This Answer Correct ?    1 Yes 1 No

I have one GDG. Everyday One new version is being created.Now I want to split this created versio..

Answer / neelu

i think we need to generate a JCL through a cobol program
and then run the Created JCL.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer



More JCL Interview Questions

Say I have a file with 12 records. Each record has the name of the month. I have to append data in these 12 records into 1 record. How is it possible?

2 Answers   CTS,


I have 15 flat files. each record in the files have the monthly salary for 12 months with the employee number. Now I want to concatenate the 15 files such that for the employee numbers that are common the o/p file should have only one record and the salaries should be concatenated to that record. How can we do it with JCL?

1 Answers  


Suppose I have five jobs to do. But I want to hold one?

0 Answers  


what is JCL?

0 Answers  


A maximum of 100 chars can be passed to Cobol through Parm in JCL, If we want to pass more than 100 Chars how we can do it ?

3 Answers   IBM,






Hi, can we call catalog( say myproc } proc n times in jcl if so how please explain Thanks in advance

2 Answers   Cap Gemini,


i want to restart frm step 2, previously i coded cond parameter on step2 wht happens at tht time ?

4 Answers   Infosys,


How dummy is used in jcl?

0 Answers  


A STEP has more than 1 file as INPUT. And we have to put all these records int 1 output file. How to do ? //InputF  DD DSN=ID.File1              DSN=ID.File2              DSN=ID.File3

1 Answers   FIS,


What does the TIME parameter signify ? What does TIME=1440 mean ?

6 Answers   Accenture, TCS,


What is job control language?

0 Answers  


What is jcl in mainframe?

0 Answers  






Categories