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
What are steplib and joblib?
Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?
How to execute 2nd and 4th steps among 5 steps in jcl proc?
Explain how can return codes be tested before execution of a job step?
Why include statement is used in a jcl?
a set statement is used to define commonly used symbolic across job steps or procedures. It initializes the previous values in the symbolic names. It has to be defined before the first use of the symbolic names in the jcl. State whether true or false?
How can a jobs execution priority be modified?
How to pass the parameter in parm using linkage section ? (syntax)?
What are the rules employed while naming the steps in a job?
what are the types of abends that occur on job failure? And explain the possible causes of these
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?
List the different components of jcl statement?
Explain the jcl exec statement?
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?
what operation is performed by job statement?