View previous topic :: View next topic |
Author |
Message |
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Wed Feb 23, 2011 5:25 am Post subject: How to pass a long parm to REXX thru batch jcl |
|
|
Hello Team,
I have a rexx which is called from a batch jcl using IKJEFT01. Now, the issue is the user provides 5 data set names in the SET statement of the JCL at the beginning of the job. I pass this data set names to the rexx exec which then does processing based on the name of the data sets. Something like below:
//JOBCARD...
// SET DS1=firstpdsdsnname
// SET DS2=secondpdsdsnname
// SET DS3=thirdpdsdsnname
// SET DS4=fourthpdsdsnname
// SET DS5=fifthpdsdsnname
//STEP1 EXEC PGM=IKJEFT01,
// PARM='%execname &DS1 &DS2..'
//other statements...
Now when I execute this jcl it gives me a "IEFC642I EXCESSIVE PARAMETER LENGTH ON THE EXEC STATEMENT" since obviously the parm string is too long. Is there an alternate way to get the data set names from the user and pass that long string dynamically to the rexx exec ? Thanks for any help in this direction. _________________ I did not fail; I have found 10,000 ways that would not work - Albert Einstein. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Feb 23, 2011 12:49 pm Post subject: |
|
|
amit4u79,
The max length of a parm via JCL is only 100 bytes. You cannot over ride that. However you can pass parms of lengths greater than 100 bytes via a program to your rexx exec.
Kolusu |
|
Back to top |
|
|
IEFBR14 Beginner
Joined: 13 Aug 2008 Posts: 17 Topics: 0 Location: SYS1.LINKLIB
|
Posted: Wed Feb 23, 2011 7:48 pm Post subject: |
|
|
If you want the dsnames why not alloc them in the JCL ..whichever way works but
//dd1 dd disp=shr,dsn=&ds1
.
.
and in the exec use LISTDSI with "file" ..then use SYSDSNAME
or just pass the parm to the rexx (but that is a non-jcl solution as kolusu says you are limited to 100 bytes ) |
|
Back to top |
|
|
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Thu Feb 24, 2011 7:00 am Post subject: |
|
|
Hi Kolusu/IEFBR14, thanks a lot for your suggestions. Let me tell you what I intend to achieve and that might help me get some efficient solution from you guys. Basically, I want the user to provide data set names thru those SET statements and if he provides 1 data set name I need to pass that to exec or if 2 data set names I need to pass those 2 ds names to the exec and so on upto a maximum of 5. So, probably IEFBR14, I am not sure how do I use the DD allocation type of solution you suggested. Is there a way that if user provided only SET values for DS1 and DS2 in my JCL above I can have my exec step have the DD allocation dynamic ? Something like
//JOBCARD...
// SET DS1=dataset1
// SET DS2=dataset2
// SET DS3=
// SET DS4=
//*
//STEP1 EXEC PGM=IKJEFT01
// IF DS1 <> '' THEN
//DD1ALLOC DISP=SHR,DSN=&DS1
// ENDIF
// IF DS2 <> '' THEN
//DD2ALLOC DISP=SHR,DSN=&DS2
// ENDIF
:
If so, I am not sure how to use the IF statements to check for a blank value of those SET parameters. I know to use IF/ENDIF for STEP cond code checking but not sure how to achieve above if that is how this can be achieved.
Thanks for any help or suggestion in this direction.
Regards,
-Amit. _________________ I did not fail; I have found 10,000 ways that would not work - Albert Einstein. |
|
Back to top |
|
|
taltyman JCL Forum Moderator
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Thu Feb 24, 2011 10:21 am Post subject: |
|
|
How you do this may be dictated by the method you are using to get the dataset names from your users. For example if you are using TSO/ISPF then maybe panel processing is your front end. If so then the rexx or clist code can determine how many datasets, their names and then build your JCL or whatever your code needs from panel processing. |
|
Back to top |
|
|
IEFBR14 Beginner
Joined: 13 Aug 2008 Posts: 17 Topics: 0 Location: SYS1.LINKLIB
|
Posted: Mon Feb 28, 2011 7:37 pm Post subject: |
|
|
Amit
You asked how to get dsnames into your rexx
The code can process 1->N DD cards (if there's is only 2, stop at 3 , if 1 stop at 2 etc)
Is the user going to amend the JCL before submit or as taltyman asks is there an ISPF front end
Must say though ...all looks a bit contrived |
|
Back to top |
|
|
|
|