View previous topic :: View next topic
|
Author |
Message |
Mahsa Rouzkhatouni
New User
Joined: 27 Feb 2021 Posts: 32 Location: Germany
|
|
|
|
Hi ,
I've asked a question about invoking REXX within jcl in here
and I am not sure if I had to ask this question here or continue that...
So the question is, how should I correctly specify DDNAMEs in JCL that are allocated in REXX? I have this in my REXX:
Code: |
"ALLOC F(OT1) DS('MYDS.INPUT(MEMBER)') SHR" |
and this in my JCL:
Code: |
//STEP1 EXEC PGM=IRXJCL,REGION=0K,PARM='XXXXX'
//OT1 DD DSN=MYDS.INPUT(MEMBER),DISP=SHR
|
but I still get RC(-3) with no explanation. any thoughts?
Thanks in advance
Mahsa Rouzkhatouni |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
You don't allocate datasets in your REXX that are already allocated by JCL, what would be the purpose? If you need to reallocate then you either do a FREE before ALLOCATE or add the REUSE parameter to the ALLOCATE.
I do wonder about the rc -3 though. Are you in the TSO or MVS environment at the time? When in doubt do ADDRESS TSO in front, though that would require you use PGM=IKJEFT01 instead of IRXJCL, which I would recommend in any case. I think that you can use ADDRESS MVS ALLOCATE .. with IRXJCL, but I'm not sure. |
|
Back to top |
|
|
Mahsa Rouzkhatouni
New User
Joined: 27 Feb 2021 Posts: 32 Location: Germany
|
|
|
|
Quote: |
You don't allocate datasets in your REXX that are already allocated by JCL. |
well I first wrote my REXX code then decided to invoke it by JCL. and for that I need to name each of the datasets that I allocated in REXX. By the way, as I understand, I MUST allocate my datasets in REXX as I am doing a ton of read/write work with them. I have to allocate them, right??
Quote: |
I do wonder about the rc -3 though. Are you in the TSO or MVS environment at the time? |
Yes before the ALLOCATE command I have an "ADDRESS TSO" part.
Quote: |
use PGM=IKJEFT01 instead of IRXJCL, which I would recommend in any case. |
EXACTLY... thanks. That is what I have to do. just now I changed IRXJCL with IKJEFT01 and the allocation worked beautifully.
However now I get another RC(-3) for the
Code: |
ADDRESS ISPEXEC "SELECT PGM(ISRSUPC) PARM("PARMS")" |
its changing environment again, shouldn't it be ok with IKJEFT01?? |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2022 Location: USA
|
|
|
|
Generally speaking, it is not good idea to mix together both static allocation (via DD statement), and dynamic allocation (via TSO ALLOC, or other allocation programs) - for the same DD-names. In 99.99% of cases there is no objective to do so, but it may cause other problems while there is lack of understanding of zOS internals involved into this process.
Do not make your life harder for no reason. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
To use ISPF services, ISPF requires a number of datasets allocated and that the command is started by the ISPSTART or PDF command.
Something like:
Code: |
//BE EXEC PGM=IKJEFT1B,PARM='ISPSTART CMD(%your-command)'
//SYSEXEC DD DISP=SHR,DSN=system.exec.lib
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//ISPMLIB DD DISP=SHR,DSN=ISP.SISPMENU
//ISPPLIB DD DISP=SHR,DSN=ISP.SISPPENU
//ISPSLIB DD DISP=SHR,DSN=ISP.SISPSENU
//ISPTLIB DD DISP=SHR,DSN=ISP.SISPTENU
//ISPPROF DD UNIT=SYSDA,SPACE=(TRK,(5,5,5)),RECFM=FB,LRECL=80
//ISPLOG DD DUMMY SYSOUT=*,RECFM=VA,LRECL=125,BLKSIZE=129
//ISPFILE DD SYSOUT=*,RECFM=FB,LRECL=80,BLKSIZE=6240 |
|
|
Back to top |
|
|
hankoerlemans
New User
Joined: 25 Jan 2018 Posts: 57 Location: Australia
|
|
|
|
You really don't need to run ISRSUPC out of ISPF.
The ISPF dialogs support batch running and it's likely that SISPSLIB(ISRSBJCL) is utilized to massage the JCL. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
read the ISPF manuals on how to run ISRSUPC as a pure batch program ...
something like this for a search
Code: |
****** ***************************** Top of Data ******************************
- - - - - - - - - - - - - - - - - - - 2 Line(s) not Displayed
000003 //ISR EXEC PGM=ISRSUPC, *
000004 // PARM=(SRCHCMP,'LNFMTO')
000005 //NEWDD DD DISP=SHR,DSN=<YOUR PDS>
000006 //OUTDD DD SYSOUT=(*)
000007 //SYSIN DD *
000008 SRCHFOR '<YOUR SEARCH STRING>'
000009 /*
****** **************************** Bottom of Data ****************************
|
here is the link to the relevant manual with the sample jcl snippets
www.ibm.com/docs/en/zos/2.2.0?topic=search-examples |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
Good point, but in general when you use ADDRESS ISPEXEC then the ISPF environment and thus dataset allocations must be there. |
|
Back to top |
|
|
Mahsa Rouzkhatouni
New User
Joined: 27 Feb 2021 Posts: 32 Location: Germany
|
|
|
|
Thanks guys,
I'm studying ISPF DDNAMEs and trying different things based on your suggestions.
Thanks for all your help.
I'll be back if anything abnormal came up. |
|
Back to top |
|
|
Mahsa Rouzkhatouni
New User
Joined: 27 Feb 2021 Posts: 32 Location: Germany
|
|
|
|
Quote: |
ISPF requires a number of datasets allocated and that the command is started by the ISPSTART or PDF command. |
Ok so I studied it and finally what did work was to change "ADDRESS ISPEXEC" with
Code: |
ADDRESS LINKMVS "ISRSUPC PARMS" |
and it worked nicely.
So for this step I am done and the program works fine.
However I'm gonna work on the allocation of my datasets to give the JCL their control.It's something new for me to study.
Many thanks to you all.
Mahsa Rouzkhatouni |
|
Back to top |
|
|
|