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 difference between the positional and keyword parameters? Give examples.

708


IIN APITUDE THEY GAVE ONLY 10 QUESTIONS.. THEY ARE SIMPLE ONE FROM NUMBER SERIES,BOATS,TIME & DISTANCE,PROFIT &LOSS,FIND OUT THE NUMBER ? 9 25 4 36 81 64 49 AND surveillance SPELLINGS E.T.C

1625


What are the parameters that are used in creating a gdg?

737


which parameter is use to declare the name of dataset in dd statement?

732


How can the attributes of one sms dataset be copied to another dataset?

850






How can an in-stream dataset be terminated?

846


Explain the purpose of dd * statement in jcl?

639


which parameter is used to check the syntax of a jcl without executing it?

798


How does the jcl specify the job to os?

692


Immediate Job opening for mainframe professionals in Keane Bangalore. Please find the below details: Organization: Keane India Location: Bangalore Skill: COBOL, JCL,VSAM,DB2,CICS,IMS,REXX,CLIST Exp: 1 to 4 years only Employment Type: Permenant Employee Note: If you have attended keane interview in past 6 months please ignore this job opening. Please respond to email id keanemfjob@gmail.com OR keanemfjob@yahoo.in with your latest resume and following details, We will contact you within 24 hours: Total IT Exp: Exp in Mainframe: Current CTC: Expected CTC: Notice Period:

3528


I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.

726


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

654


How to do automated restart when a job abend?

791


how to do automated restart when a job abends?

847


Explain the function of //cntl statement?

656