View previous topic :: View next topic
|
Author |
Message |
Govarthanan
New User
Joined: 22 Nov 2013 Posts: 10 Location: India
|
|
|
|
Hello All,
I am facing a problem with a tool I am developing. Please let me know if there are any other ideas or ways to solve this.
I have a an ISPF program that submits a skeleton JCL which runs a REXX program at the back end.
1. The ISPF prog is as below
Code: |
ADDRESS ISPEXEC
"LIBDEF ISPSLIB DATASET ID('MY DATASET')"
"FTOPEN TEMP"
"FTINCL CALLREXX"
"FTCLOSE"
"VGET ZTEMPF"
ADDRESS TSO
"SUBMIT '"ZTEMPF"'"
|
2. and the JCL is as below
Code: |
//JOBLIB DD DSN=DB85.DSNEXIT,DISP=SHR
// DD DSN=DB85.DSNLOAD,DISP=SHR
// DD DISP=SHR,DSN=MVSP.MIGRATON.SFSYLOAD
//*
//STEP1 EXEC PGM=IKJEFT01,PARM='%PROG1 &PARM1,&PARM2,&PARM3'
//SYSEXEC DD DSN=MYREXX.TO.BE.CALLED,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
|
And now since my parm1, parm2 and parm3 are too big, i get the following error
Code: |
* ISPF105 *
* *
* Output overflow *
* Line to be written greater than data set LRECL (80), CALLREXX record-8 *
* File tailoring input line: *
//STEP1 EXEC PGM=IKJEFT01,PARM='%PROG1 &PARM1,&PARM2,&PARM3'
|
So till this it is an expected error, are there any other ways to make the prog run at back end.
The reason I had to go with this approach was bcoz the REXX program runs for a longer time, so i thought of making it to run in BATCH mode. But again am facing a dead end here.
Please do let me know if there are some other ways, that I should explore.
Let me know in case of any concerns or queries.
Regards,
Govarthanan.K |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Put the parameters in a file and change the rexx program to read the file. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
As Sr. Vera suggests, you can place the parameters in a data set (or in-stream; ISPF file tailoring will work with in-stream variables). You can also break up your EXEC statement, thus:
Code: |
//STEP1 EXEC PGM=IKJEFT01,
// PARM='%PROG1 &PARM1,
// &PARM2,
// &PARM3' |
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
As Sr. Vera suggests, you can place the parameters in a data set |
Actually, I said 'file' rather than data set. What I meant was to put the variables in-stream as you suggest. The file tailoring skeleton can be used to provide the in-stream records:
Code: |
//JOBLIB DD DSN=DB85.DSNEXIT,DISP=SHR
// DD DSN=DB85.DSNLOAD,DISP=SHR
// DD DISP=SHR,DSN=MVSP.MIGRATON.SFSYLOAD
//*
//STEP1 EXEC PGM=IKJEFT01,PARM='%PROG1'
//SYSEXEC DD DSN=MYREXX.TO.BE.CALLED,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//MYDATA DD *
&PARM1
&PARM2
&PARM3
/* |
|
|
Back to top |
|
|
sureshpathi10
Active User
Joined: 03 May 2010 Posts: 154 Location: Kuala Lumpur
|
|
|
|
Mr Pedro,
For me &PARM1, &PARM2, and &PARM3 looks like symbolic parameters.
I doubt that, we can use symbolic parameters within in-stream data. I may be wrong. Could you straighten me up?
My apologies, if this looks silly. But I really need to clarify for my future references. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Presumably your file tailoring is replacing &PARMx so these will actually be data values within the instream data. |
|
Back to top |
|
|
Govarthanan
New User
Joined: 22 Nov 2013 Posts: 10 Location: India
|
|
|
|
Thank you Pedro and Akatsukami, but i am sincerely sorry for my silly mistake.
One thing I dint mention earlier was, the parameters are basically queries so they tend to go beyond more than 100 characters, which is a limit in JCL.
So one way is to write in a file and read it in my REXX, is there any other way. Despite my search i found these 2 links nearly suiting my approach.
pic.dhe.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.ikjc300%2Fikj4c310107.htm
and
stackoverflow.com/questions/1960784/how-to-pass-arguments-to-rexx-program-through-jcl
So what I tried was like below
Code: |
//SYSTSIN DD *
%ALPHA1
SELECT COL1 FROM TABLE WHERE COL3=? AND COL4 = ? -
SELECT CL7 FROM TABLE1 WHERE COL2 = ? AND COL3 = ? -
/*
|
The program is being invoked, but the parameters are not being substituted.
My doubt is how do we read the input into REXX, is it like reading a file or jus with keyword ARG, bcoz i tried both, and they dint work.
Please let me know if I am not clear, I can explain a bit more clear. Thanks in advance |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
I think as though you need a dash after %ALPHA1
Like this:
Code: |
//SYSTSIN DD *
%ALPHA1 -
SELECT COL1 FROM TABLE WHERE COL3=? AND COL4 = ? -
SELECT CL7 FROM TABLE1 WHERE COL2 = ? AND COL3 = ? -
/* |
|
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
One more thing....
I understand English may not be your language, so words like 'bcoz' and 'dint' are not a part of it.
Try using the actual words instead. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Oh, "dint" is an English word; it means an indentation, as in "My blow put a large dint in the software engineer's head" |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
Middle English, short for indenten to make dents in, indent
First Known Use: 14th century |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
By dint of a search engine, another meaning was lost. |
|
Back to top |
|
|
Govarthanan
New User
Joined: 22 Nov 2013 Posts: 10 Location: India
|
|
|
|
My sincere apologies Dave, for my English. I promise not to repeat them again.
Thanks for your hyphen (dash) also at the end of line 1, the program read the first parameter, but i am not able to differentiate subsequent parameters. I tried separating parameters with comma , is there something that I am missing
Code: |
//SYSTSIN DD *
%ALPHA1 -
SELECT COL1 FROM TABLE WHERE COL3=? AND COL4 = ? , -
SELECT CL7 FROM TABLE1 WHERE COL2 = ? AND COL3 = ? -
/*
|
but still parameter1 in my program reads both the query.
Thanks in advance |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
I think the issue is that you are trying to pass too much through an input argument.
While each line is a single parameter in YOUR MIND, the Rexx program (which you have not shown us, so I am using my crystal ball), sees PARM1 = SELECT, PARM2 = COL1, PARM3 = FROM etc
I have been coding Rexx since 1989, and I have never tried to pass this much data thru parameters.
If it were me, I would try the example Pedro shows above.
Your ALPHA1 program can use EXECIO to read MYDATA DD into PARM1, PARM2, PARM3.
You can continue to try your way, but better to take advice from those here. Isn't that why you posted in the first place? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Your example is too simple.
My experience with SELECT statements is that they can be quite large. You may want to write some that span many lines. For that reason, I think you need to read the statements from a file rather than as parameters to the exec. The normal delimiter for DB2 is a semicolon (';'). I think you want to read lines from a file until you find the semicolon and then concatenate all of the lines to create the single SELECT statement.
Then, read more lines until you find a semicolon, concatenate those, and so on ...
You may want to handle semicolons that occur within a quoted string... it should not be treated as a delimiter. |
|
Back to top |
|
|
Govarthanan
New User
Joined: 22 Nov 2013 Posts: 10 Location: India
|
|
|
|
Thanks Dave and Pedro.
I guess it s better I stick to the file format itself rather than passing.
I will try and let you know people. Thanks all |
|
Back to top |
|
|
|