|
View previous topic :: View next topic
|
| Author |
Message |
Santty
New User
Joined: 20 Nov 2007 Posts: 37 Location: USA
|
|
|
|
Hi I am able to list the PDS and write it to a file when executing a REXX through TSO command. It worked fine.
But when i tried to write a batch job i am receving RC = 20 in the below line
| Code: |
| "ISPEXEC LMDINIT LISTID("IDV") LEVEL("DS")" |
This is my REXX program
| Code: |
/*REXX*/
/************ GET THE LIST OF CMN PDS ********/
ARG DATASET
DS = DATASET
SAY 'DATASET:' DS
ADDRESS TSO
"ISPEXEC LMDINIT LISTID("IDV") LEVEL("DS")"
SAY RC
IX = 0
DO FOREVER
"ISPEXEC LMDLIST LISTID("IDV") OPTION(LIST) DATASET(DSVAR)"
IF RC <> 0 THEN DO
"ISPEXEC LMDLIST LISTID("IDV") OPTION(FREE)"
LEAVE
END
.....
|
My JCL
| Code: |
//STEP10 EXEC PGM=IKJEFT01,REGION=0M,
// PARM='GETALPDS HLQ.**'
//SYSPROC DD DISP=SHR,DSN=REXXPDS.REXX
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//ISPMLIB DD DSN=HLQ.ISPMLIB,DISP=SHR
//ISPPLIB DD DSN=HLQ.ISPPLIB,DISP=SHR
//ISPSLIB DD DSN=HLQ.ISPSLIB,DISP=SHR
//ISPLLIB DD DSN=HLQ.LOAD,DISP=SHR
//SYSTSIN DD DUMMY
//FILEOUT DD DSN=HLQ.LIST, * OUTPUT FILE
// DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(15,5),RLSE),
// UNIT=SYSDA,DCB=(RECFM=FB,LRECL=080,BLKSIZE=0)
//ISPPROF DD DSN=&&PROFILE,
// DISP=(,DELETE,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(1,1,1),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
|
PLease let me know if i am missing anything ... |
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Yes - you missed a [/code] and obviously the Preview button is missing from your editor.
Also, when invoking IKJEFT01 it is normal to provide SYSTSIN to let it know what it should be doing. |
|
| Back to top |
|
 |
Akatsukami
Global Moderator

Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
| You appear to be passing the namme of the Rexx script to background TSO via the PARM parameter. This is entirely acceptable when using TSO only; when using ISPF, however, you should use a SYSTSIN DD, as Mr. Clouston has said, and invoke ISPF via ISPSTART CMD(scriptname). |
|
| Back to top |
|
 |
Santty
New User
Joined: 20 Nov 2007 Posts: 37 Location: USA
|
|
|
|
But still i am receving ISPV010 message not found in 'ISPMLIB' library.
| Code: |
CMG999 Message ISPV010 - ISPV010 message not found in 'ISPMLIB' library. |
My JCL
| Code: |
//STEP10 EXEC PGM=IKJEFT01,REGION=0M
//SYSPROC DD DISP=SHR,DSN=HLQ.REXX
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//ISPMLIB DD DSN=HLQ.ISPMLIB,DISP=SHR
//ISPPLIB DD DSN=HLQ.ISPPLIB,DISP=SHR
//ISPSLIB DD DSN=HLQ.ISPSLIB,DISP=SHR
//ISPTLIB DD DDNAME=ISPTABL
// DD DSN=HLQ.ISPTLIB,DISP=SHR
//ISPTABL DD DSN=HLQ.ISPTLIB,DISP=SHR
//ISPLLIB DD DSN=HLQ.LOAD,DISP=SHR
//SYSTSIN DD *
ISPSTART CMD('MYPDS(MEMBER)' HLQ.**)
//*
//FILEOUT DD DSN=HLQ.LIST, * OUTPUT FILE
// DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(15,5),RLSE),
// UNIT=SYSDA,DCB=(RECFM=FB,LRECL=080,BLKSIZE=0)
//ISPPROF DD DSN=&&PROFILE,
// DISP=(,DELETE,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(1,1,1),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
|
|
|
| Back to top |
|
 |
Akatsukami
Global Moderator

Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
| Why do you not concatenate mypds to SYSPROC instead of trying to put it in the CMD parameter? |
|
| Back to top |
|
 |
Santty
New User
Joined: 20 Nov 2007 Posts: 37 Location: USA
|
|
|
|
Yes... I tried that too but no luck ...
I am getting the same error message
CMG999 Message ISPV010 - ISPV010 message not found in 'ISPMLIB' library.
I am not sure what is missing here.... |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| You don't have your site's system ISPF messages library concatenated to ISPMLIB. ISPV010 is a standard system message usually stored in the site ISPF message library. |
|
| Back to top |
|
 |
Akatsukami
Global Moderator

Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
| I see that you have posted only a part of your script. It is short enough that you can post the whole thing? |
|
| Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2624 Location: Silicon Valley
|
|
|
|
| Quote: |
I am not sure what is missing here....
|
Besides the messages library, you also should provide the other ISPF data sets.
For example, message ISPV010 is:
| Code: |
ISPV010 Profile not loaded - Profile table 'aaaaaaaa' not read.
Table service RC=bbbbbbbb. |
and shows that you are missing the ISPTLIB concatenation. |
|
| Back to top |
|
 |
Santty
New User
Joined: 20 Nov 2007 Posts: 37 Location: USA
|
|
|
|
Please find the full script
JCL
| Code: |
//Jobname JOB (1234567),' ',
// CLASS=?,MSGCLASS=?,NOTIFY=&SYSUID
//*
//******************************************************
//* GET ALL THE PDS NAMES
//******************************************************
//*
//STEP10 EXEC PGM=IKJEFT01,REGION=0M
//* PARM='ISPSTART CMD(MEMBER) HLQ.**'
//SYSPROC DD DISP=SHR,DSN=HLQ.REXX
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//ISPMLIB DD DSN=HLQ.ISPMLIB,DISP=SHR
//ISPPLIB DD DSN=HLQ.ISPPLIB,DISP=SHR
//ISPSLIB DD DSN=HLQ.ISPSLIB,DISP=SHR
//ISPTLIB DD DDNAME=ISPTABL
// DD DSN=HLQ.ISPTLIB,DISP=SHR
//ISPTABL DD DSN=HLQ.ISPTLIB,DISP=SHR
//ISPLLIB DD DSN=HLQ.LOAD,DISP=SHR
//SYSTSIN DD *
ISPSTART CMD(MEMBER HLQ.**)
//*
//FILEOUT DD DSN=HLQ.LIST, * OUTPUT FILE
// DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(15,5),RLSE),
// UNIT=SYSDA,DCB=(RECFM=FB,LRECL=080,BLKSIZE=0)
//ISPPROF DD DSN=&&PROFILE,
// DISP=(,DELETE,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(1,1,1),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//
|
MEMBER is the REXX program
REXX program
| Code: |
/*REXX*/
/************ GET THE LIST OF CMN PDS ********/
ARG DATASET
DS = DATASET
SAY 'DATASET:' DS
ADDRESS TSO
"ISPEXEC LMDINIT LISTID("IDV") LEVEL("DS")"
SAY RC
IX = 0
DO FOREVER
"ISPEXEC LMDLIST LISTID("IDV") OPTION(LIST) DATASET(DSVAR)"
IF RC <> 0 THEN DO
"ISPEXEC LMDLIST LISTID("IDV") OPTION(FREE)"
LEAVE
END
IX = IX + 1
WORK.IX = DSVAR
SAY "DSVAR:" DSVAR
IF (SUBSTR(WORK.IX,23,1) = ' ') & ,
(SUBSTR(WORK.IX,19,1) <> ' ') THEN
QUEUE SUBSTR(DSVAR,10,4) SUBSTR(DSVAR,15,3) WORK.IX
SAY WORK.IX
END
ADDRESS TSO
"EXECIO" QUEUED() "DISKW FILEOUT ( FINIS"
"FREE F(FILEOUT)"
SAY 'RC:'RC
ADDRESS TSO "DELSTACK"
EXIT
|
|
|
| Back to top |
|
 |
Akatsukami
Global Moderator

Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
| If your shop has a standard ISPF proc, I suggest that you use it, so as to avoid the problems noted by Mr. Sample and Sr. Vera. If you do so, I think that you will find no further problems with your script. |
|
| Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2624 Location: Silicon Valley
|
|
|
|
I noticed you use a stem variable, as if you are going to use the STEM form of the EXECIO command. But instead, you use the form that gets its data from the stack.
I do not think you need to use a stem variable:
| Code: |
IX = IX + 1
WORK.IX = DSVAR |
And other places. Instead, use DSVAR where you use WORK.IX
Your code will work regardless, except if you have an extremely large number of members. In that case, you will have a copy of the data in the stem, as well as a copy QUEUE'd up, plus a copy that ISPF maintains via LMDLIST. You may encounter storage exhausted problems. |
|
| Back to top |
|
 |
Santty
New User
Joined: 20 Nov 2007 Posts: 37 Location: USA
|
|
|
|
Thank you Akatsukami, Sample , Vera and Clouston ..
I added ISPLOG and made some changes to the ISPTLIB.
The program is working fine now.
But is can see a message at the end of SYSTSPRT as below
| Code: |
| MYRACFID.MYRACFID.JOBID.D0000103.? was preallocated (no free was done). |
Can you please help me in this ?? |
|
| Back to top |
|
 |
Akatsukami
Global Moderator

Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
| IIRC, this is because you did add the ISPLOG DD to the JCL; ISPF warns you that it wished to allocate the data set dynamically. Remove the DD, and the message should go away. |
|
| Back to top |
|
 |
Santty
New User
Joined: 20 Nov 2007 Posts: 37 Location: USA
|
|
|
|
Yes .. You are right.
But if i remove ISPLOG i am receving the below message
| Code: |
ISPF system data set allocation error - press Enter to continue.
Log file allocation error - ISPF will operate without a log data set.
Data set 'MYRACFID.SPFLOG1.LIST' in use by another user, try later.
|
|
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
| That other user is you - most likely. you probably do not need the log so you could dummy it. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|