There are a set of 10 files and a customer will be
selecting random no of files(i.e they may be more than 2,
may not be in the order).Sometimes he might just select
one file or sometimes no files at all.How do you code a JCL
for this? Is it possible to code just JCL alone for this
problem?

Answer Posted / yogendra shinde

Hi,
I don't know the exact answer to this query.
But I have following approach.

Suppose I have a cobol pgm (say) PGM123 that is picking up
files randomly. (We definately need 1 application pgm to
process any of those 10 files randomly. This is my basic
assumption)
I will code a PARM or SYSIN DD * where in my customer can
change order of selection of files .

Say if customer enters PARM as ABCD in order then I will
move this PARM ABCD in a working storage variable in COBOL
PGM and will read each byte A (assign to process file-1)
if second byte is B then process file-2 of third byte is C
then process file-3 and so on. If the cutomer changes this
parm as EDA then files processed will be file-5 then file-4
then file-1.

If any body has different approach pls let me know.

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of dd * statement in jcl?

793


What is jcl in mainframe, and how many types of jcl statements are there for a job?

626


How to submit jcl through a cobol program?

669


Explain the job statement in jcl?

640


How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?

1795






Explain in DD statement what is the use of DCB parameter?

646


whats the diff bw the evaluate also and and?

1846


What is the difference between run mode and addressing mode?

629


How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?

709


Explain how can values be passed from the job stream to an executable program?

608


List in order the hierarchical levels of jcl?

664


If a (+1) generation dataset is created in the first step of a job, how can it be referenced in later steps of the same job for input?

775


Why block size is multiple of lrecl in jcl?

906


Are there any set of rules for the names of the steps used in a job?

627


How can unused space allocation be returned to the system when a dataset is closed?

802