|
View previous topic :: View next topic
|
| Author |
Message |
sivakumar somala
New User

Joined: 26 Sep 2007 Posts: 10 Location: Mumbai
|
|
|
|
Hello,
Good day..!
I am trying to get the following information for a given set of members in a PS file as input. To start with, I have used LISTDS command manually to acheive it. But it is not sufficient for my requirement. Could you please help me if there is any other way to achieve this. Thanks in advance.
Input in s PS file:
| Code: |
MEMBER1
MEMBER2
MEMBER3
MEMBER4
MEMBER5
MEMBER6
MEMBER7
MEMBER8 |
Output:
| Code: |
Name Created Changed ID
MEMBER1 2014/09/18 2014/09/18 14:52:23 User1
MEMBER2 2004/03/05 2014/05/08 09:30:43 User2
MEMBER3 2004/03/05 2014/05/20 16:11:22 User1
MEMBER4 2014/09/18 2014/09/25 07:28:25 User3
MEMBER5 2014/01/22 2014/09/25 07:35:45 User3
MEMBER6 2014/01/22 2014/04/30 16:35:58 User4
MEMBER7 2014/01/22 2014/03/14 08:38:51 User2
MEMBER8 2014/01/22 2014/03/14 12:10:45 User1 |
|
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You can run DSLIST in batch too
There are quite a few examples on the forum |
|
| Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2624 Location: Silicon Valley
|
|
|
|
| I think you want to use the LMMLIST service. |
|
| Back to top |
|
 |
sivakumar somala
New User

Joined: 26 Sep 2007 Posts: 10 Location: Mumbai
|
|
|
|
Hi All,
Thanks for your inputs.
I have written a small Rexx snipet to get the details when run.
| Code: |
/* Rexx */
PDSNAME = 'CYM1.FORX.PROM.SRC'
Address ISPEXEC
"LMINIT DATAID(DDVAR) DATASET('"PDSNAME"') ENQ(SHR)"
"LMOPEN DATAID("DDVAR")"
Say PDSNAME
Do Forever
"LMMLIST DATAID("DDVAR") OPTION(LIST) MEMBER(MEMNAME) STATS(YES)"
If RC > 0 then do
Leave
End
Say ' 'MEMNAME ZLCDATE ZLMDATE ZLMTIME ZLUSER
End
"LMFREE DATAID("DDVAR")" |
And I am using the following JCL to execute the Rexx program.
| Code: |
//ISPFBAT EXEC PGM=IKJEFT01,
// PARM='ISPSTART CMD(MYREXX)'
//SYSEXEC DD DISP=SHR,DSN=MYID.REXX.PROC
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=*
//ISPMLIB DD DISP=SHR,DSN=SYS3.ISPMLIB
//ISPPLIB DD DISP=SHR,DSN=SYS3..ISPPLIB
//ISPSLIB DD DISP=SHR,DSN=SYS3..ISPSLIB
//ISPTLIB DD DISP=SHR,DSN=SYS3..ISPTLIB
//ISPLLIB DD DISP=SHR,DSN=SYS3..ISPLLIB
//ISPLOG DD SYSOUT=*,DCB=(RECFM=VA,LRECL=125,BLKSIZE=0)
//ISPPROF DD DSN=MYID.ISPPROF,DISP=SHR |
The job is abending with the folllowing message.
| Code: |
CSV003I REQUESTED MODULE IRXJXL NOT FOUND
CSV028I ABEND806-04 JOBNAME=CYM1SRBT STEPNAME=STEP010
IEA995I SYMPTOM DUMP OUTPUT 136
SYSTEM COMPLETION CODE=806 REASON CODE=00000004 |
Can you please help me on how to resolve this error. Or is there any other alternate way to execute my Rexx through JCL.
Thanks,
Siva |
|
| Back to top |
|
 |
Mickeydusaor
Active User

Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
| where is STEP010 ??????? you have not shown this step |
|
| Back to top |
|
 |
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
| The module name should be IRXJCL not IRXJXL |
|
| Back to top |
|
 |
sivakumar somala
New User

Joined: 26 Sep 2007 Posts: 10 Location: Mumbai
|
|
|
|
Hi All,
Thanks for your inputs.
I have changed my JCL as shown below. But the job fails with RC=12 this time. Here are the details:
JCL
| Code: |
//ISPFBAT EXEC PGM=IKJEFT01,
// PARM='ISPSTART CMD(RPRTREXX)'
//STEPLIB DD DISP=SHR,DSN=MYID.PROC.IRXJCL.LOAD
//SYSEXEC DD DISP=SHR,DSN=MYID.REXX.PROGLIB
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=*
//ISPMLIB DD DISP=SHR,DSN=SYS3.ISPMLIB
//ISPPLIB DD DISP=SHR,DSN=SYS3.ISPPLIB
//ISPSLIB DD DISP=SHR,DSN=SYS3.ISPSLIB
//ISPTLIB DD DISP=SHR,DSN=SYS3.ISPTLIB
//ISPLLIB DD DISP=SHR,DSN=SYS3.ISPLLIB
//ISPLOG DD SYSOUT=*,DCB=(RECFM=VA,LRECL=125,BLKSIZE=0)
//ISPPROF DD DSN=MYID.ISPPROF,DISP=SHR |
Error messages:
| Code: |
IGD103I SMS ALLOCATED TO DDNAME ISPPROF
IEA995I SYMPTOM DUMP OUTPUT
USER COMPLETION CODE=0999
TIME=11.15.08 SEQ=13252 CPU=0000 ASID=0104
PSW AT TIME OF ERROR 078D1000 89A5BD96 ILC 2 INTC 0D
ACTIVE LOAD MODULE ADDRESS=09A59000 OFFSET=00002D96
NAME=ISPTASK
DATA AT PSW 09A5BD90 - 00181610 0A0D58F0 D12C47F0
GR 0: 80000000 1: 800003E7
2: 00012918 3: 00000004
4: 09A5C2B0 5: 897C40A0
6: 097C498A 7: 00011000
8: 00015460 9: 00020090
A: 09A5C2C4 B: 09A5BEA8
C: 89A5AEA8 D: 000243F0
E: 89A5BD86 F: 00000000
END OF SYMPTOM DUMP
IEF142I MYIDSRBT ISPFBAT - STEP WAS EXECUTED - COND CODE 0012
IGD104I MYID.PROC.IRXJCL.LOAD RETAINED, DDNAME=STEPLIB |
and
| Code: |
ISPI021 Unrecoverable error in initialization of
command tables
ISPI022 ISPF cannot continue. ISPF abending.
ISPSTART ENDED DUE TO ERROR+
USER ABEND CODE 0999 REASON CODE 00000000 |
Please help me on how to resolve this error.
Thanks,
Siva |
|
| Back to top |
|
 |
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Give this a shot, this is how I start ISPF and run an exec.
| Code: |
//ISPFBAT EXEC PGM=IKJEFT01
//STEPLIB DD DISP=SHR,DSN=MYID.PROC.IRXJCL.LOAD
//SYSEXEC DD DISP=SHR,DSN=MYID.REXX.PROGLIB
//SYSTSIN DD *
PROFILE NOPREFIX
ISPSTART CMD(%RPRTREXX)
/*
//SYSTSPRT DD SYSOUT=*
//ISPMLIB DD DISP=SHR,DSN=SYS3.ISPMLIB
//ISPPLIB DD DISP=SHR,DSN=SYS3.ISPPLIB
//ISPSLIB DD DISP=SHR,DSN=SYS3.ISPSLIB
//ISPTLIB DD DISP=SHR,DSN=SYS3.ISPTLIB
//ISPLLIB DD DISP=SHR,DSN=SYS3.ISPLLIB
//ISPLOG DD SYSOUT=*,DCB=(RECFM=VA,LRECL=125,BLKSIZE=0)
//ISPPROF DD DSN=MYID.ISPPROF,DISP=SHR |
|
|
| Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2624 Location: Silicon Valley
|
|
|
|
| Code: |
ISPI021 Unrecoverable error in initialization of
command tables |
There is something wrong with the ISPTLIB allocation. Is that the same data set you use while logged on? Does the ISPTLIB data set have ISR and ISP prefixed members in it? Did your batch job run on the same system where you are logged on? |
|
| Back to top |
|
 |
farhad_evan
New User
Joined: 30 Aug 2014 Posts: 24 Location: UK
|
|
|
|
maybe you should change your Ispprof and use another user profile .
i changed it and it's worked for me |
|
| Back to top |
|
 |
sivakumar somala
New User

Joined: 26 Sep 2007 Posts: 10 Location: Mumbai
|
|
|
|
Hi All,
Good day!
Still stuck with executing my Rexx snippet and capture the output in to a dataset. Any help is greatly appreciated. Thanks in advance.
JCL:
| Code: |
//ISPFBAT EXEC PGM=IKJEFT01
//STEPLIB DD DISP=SHR,DSN=SYS1.LPALIB
//SYSPROC DD DISP=SHR,DSN=MYID.REXX.PROC
//SYSTSIN DD *
PROFILE NOPREFIX
ISPSTART CMD(%RPRTREXX) 'MYID.PROM.SRC'
/*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//ISPMLIB DD DISP=SHR,DSN=SYS3.ISPMLIB
//ISPPLIB DD DISP=SHR,DSN=SYS3.ISPPLIB
//ISPSLIB DD DISP=SHR,DSN=SYS3.ISPSLIB
//ISPTLIB DD DDNAME=ISPTABL
// DD DISP=SHR,DSN=SYS3.ISPTLIB
//ISPTABL DD DISP=SHR,DSN=SYS3.ISPTLIB
//ISPLLIB DD DISP=SHR,DSN=SYS3.ISPLLIB
//ISPLOG DD SYSOUT=*,DCB=(RECFM=VA,LRECL=125,BLKSIZE=0)
//ISPPROF DD DSN=&&PROFILE,DISP=(,DELETE,DELETE),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// SPACE=(TRK,(1,1,1),RLSE)
//FILEOUT DD DSN=MYID.STATUS.REPORT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(10,15)),
// DCB=(LRECL=183,BLKSIZE=1830) |
REXX:
| Code: |
/* Rexx */
/************ GET THE MEMBER STATISTICS ********/
ARG PDS
PDSNAME = PDS
ADDRESS TSO
/*DRESS ISPEXEC */
"ISPEXEC LMINIT DATAID(DDVAR) DATASET('"PDSNAME"') ENQ(SHR)"
"ISPEXEC LMOPEN DATAID("DDVAR")"
I=0
DO FOREVER
"ISPEXEC LMMLIST DATAID("DDVAR") OPTION(LIST) MEMBER(MEMNAME),
STATS(YES)"
QUEUE SUBSTR(MEMNAME ZLCDATE ZLMDATE ZLMTIME ZLUSER)
IF RC > 0 THEN DO
LEAVE
END
SAY ' 'MEMNAME ZLCDATE ZLMDATE ZLMTIME ZLUSER
"ISPEXEC LMFREE DATAID("DDVAR")"
END
ADDRESS TSO
"EXECIO" QUEUED() "DISKW FILEOUT ( FINIS"
"FREE F(FILEOUT)"
ADDRESS TSO "DELSTACK"
EXIT |
Error in the Job log:
| Code: |
IEA995I SYMPTOM DUMP OUTPUT
SYSTEM COMPLETION CODE=047
TIME=06.43.02 SEQ=51371 CPU=0000 ASID=0160
PSW AT TIME OF ERROR 078D1000 A3A00144 ILC 2 INTC 6B
ACTIVE LOAD MODULE ADDRESS=23A00000 OFFSET=00000144
NAME=IKJEFT01
DATA AT PSW 23A0013E - 5810C360 0A6BD503 C0A8BD51
GR 0: FD000008 1: 0000000C
2: 00EB5100 3: 80006006
4: 009D3D48 5: 00000000
6: 00000000 7: 00000001
8: 009FA6D8 9: 009D18F0
A: A3A00050 B: 23A0104F
C: 00007000 D: 00007000
E: 80FD8D80 F: A3A00086
END OF SYMPTOM DUMP
IEF472I CYM1SRBT ISPFBAT - COMPLETION CODE - SYSTEM=047 USER=0000 REASON=0000000 |
|
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
1. No trace information ?
2. You need write access to ISPTABL file. |
|
| Back to top |
|
 |
nevilh
Active User
Joined: 01 Sep 2006 Posts: 262
|
|
|
|
| Have you tried removing the STEPLIB, normally having SYS1.LPALIB as a STEPLIB is not to be recommended |
|
| Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2624 Location: Silicon Valley
|
|
|
|
| Quote: |
| Have you tried removing the STEPLIB, normally having SYS1.LPALIB as a STEPLIB is not to be recommended |
I agree.
Did you look up the 047 abend? It is about APF authorization, so I would try to remove the steplib.
Also, the syntax of this looks suspicious:
| Code: |
| ISPSTART CMD(%RPRTREXX) 'MYID.PROM.SRC' |
I think the right parenthesis is misplaced. The entire command should be within the parenthesis. That includes the command name and any parameters.
Also, I think your rexx program should exit if it does NOT find a value in ARG.
Also, rather than this:
| Code: |
ADDRESS TSO
/*DRESS ISPEXEC */
"ISPEXEC LMINIT DATAID(DDVAR) DATASET('"PDSNAME"') ENQ(SHR)" |
I think you should use this:
| Code: |
ADDRESS ISPEXEC
"LMINIT DATAID(DDVAR) DATASET('"PDSNAME"') ENQ(SHR)" |
(It is just clearer to me). I realize the original will work.
I do not understand the purpose of using substr here:
| Code: |
| QUEUE SUBSTR(MEMNAME ZLCDATE ZLMDATE ZLMTIME ZLUSER) |
Please elaborate. Substr requires two parameters separated by a comma. It is not clear that the syntax is correct. |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
| Marso wrote: |
| You need write access to ISPTABL file. |
I still think you don't have write access to SYS3.ISPTLIB
Also I'm not sure about the BLKSIZE=0 in ISPPROF DD.
Can somebody check if it's correct (I'm not at work today)?
And all of Pedro's remarks are pertinent. |
|
| Back to top |
|
 |
prino
Senior Member

Joined: 07 Feb 2009 Posts: 1323 Location: Vilnius, Lithuania
|
|
|
|
| Marso wrote: |
Also I'm not sure about the BLKSIZE=0 in ISPPROF DD.
Can somebody check if it's correct (I'm not at work today)? |
That's OK, will use SDB. |
|
| Back to top |
|
 |
sivakumar somala
New User

Joined: 26 Sep 2007 Posts: 10 Location: Mumbai
|
|
|
|
Hi All,
Thanks for all your inputs.
I have made the required changes as per your suggestions.
But now, I am facing a new error. Here are the details.
JCL:
| Code: |
//ISPFBAT EXEC PGM=IKJEFT01
//*STEPLIB DD DISP=SHR,DSN=SYS1.LPALIB
//SYSPROC DD DISP=SHR,DSN=MYID.REXX.PROC
//SYSTSIN DD *
PROFILE NOPREFIX
ISPSTART CMD(%RPRTREXX 'MYID.PROM.SRC')
/*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//ISPMLIB DD DISP=SHR,DSN=SYS3.FARDX.V4R2M0.ISPMLIB
//ISPPLIB DD DISP=SHR,DSN=SYS3.FARDX.V4R2M0.ISPPLIB
//ISPSLIB DD DISP=SHR,DSN=SYS3.FARDX.V4R2M0.ISPSLIB
//ISPTLIB DD DDNAME=ISPTABL
// DD DISP=SHR,DSN=SYS3.FARDX.V4R2M0.ISPTLIB
//ISPTABL DD DISP=SHR,DSN=SYS3.FARDX.V4R2M0.ISPTLIB
//ISPLLIB DD DISP=SHR,DSN=SYS3.FARDX.V4R2M0.ISPLLIB
//ISPLOG DD SYSOUT=*,DCB=(RECFM=VA,LRECL=125,BLKSIZE=0)
//ISPPROF DD DSN=&&PROFILE,DISP=(,DELETE,DELETE),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// SPACE=(TRK,(1,1,1),RLSE)
//FILEOUT DD DSN=MYID.STATUS.REPORT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(10,15)),
// DCB=(LRECL=183,BLKSIZE=1830)
//********************************************************************** |
REXX Program:
| Code: |
/* Rexx */
/************ GET THE MEMBER STATISTICS ********/
ARG PDS
PDSNAME = PDS
/*ADDRESS TSO */
ADDRESS ISPEXEC
"LMINIT DATAID(DDVAR) DATASET('"PDSNAME"') ENQ(SHR)"
"LMOPEN DATAID("DDVAR")"
DO FOREVER
"LMMLIST DATAID("DDVAR") OPTION(LIST) MEMBER(MEMNAME),
STATS(YES)"
QUEUE (MEMNAME ZLCDATE ZLMDATE ZLMTIME ZLUSER)
IF RC > 0 THEN DO
LEAVE
END
/* SAY ' 'MEMNAME ZLCDATE ZLMDATE ZLMTIME ZLUSER */
"LMFREE DATAID("DDVAR")"
END
ADDRESS TSO
"EXECIO" QUEUED() "DISKW FILEOUT ( FINIS"
"FREE F(FILEOUT)"
ADDRESS TSO "DELSTACK"
EXIT
/***************************************************************/ |
Error Message:
JESMSGLG
| Code: |
IEF403I MYIDSRBT - STARTED - TIME=09.16.30
- --TIMINGS (MINS.)-- ----PAG
-JOBNAME STEPNAME PROCSTEP RC EXCP CPU SRB CLOCK SERV PG PAGE
-MYIDSRBT ISPFBAT 998 54 .00 .00 .00 680 0 0
IEF404I MYIDSRBT - ENDED - TIME=09.16.31 |
SYSTSPRT
| Code: |
READY
PROFILE NOPREFIX
READY
ISPSTART CMD(%RPRTREXX 'MYID.PROM.SRC')
CMG999 Message ISPV010 - ISPV010 message not found in 'ISPMLIB' library.
READY
END |
Hi Pedro,
Please elaborate. Substr requires two parameters separated by a comma. It is not clear that the syntax is correct.
<Siva>: I am trying to write the
| Code: |
| MEMNAME ZLCDATE ZLMDATE ZLMTIME ZLUSER |
details in to
.
Searched in the Forum as well as in the internet. Couldn't find any working solutions. Request your help in resolving the error.
Many thanks in advance.
Best regards,
Siva |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
The error is plainly displayed in the error message shown
As for not finding a solution to write things to the required file
Click HERE to find out how to read and write to external files. |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
- About SUBSTR:
You will find explanation and format here.
- About:
| Code: |
ARG PDS
PDSNAME = PDS
|
First, to prevent having whitespaces after the file name, use:
| Code: |
ARG PDS .
PDSNAME = PDS |
or
| Code: |
ARG PDS
PDSNAME = Strip(PDS) |
but this is even better:
About the main loop:
You check the return code after queueing the data. At the end, you will have one extra line.
It is always healthier to check the RC immediately after the command.
The parenthesis in the QUEUE are ok but not necessary.
And "IF RC > 0 THEN LEAVE" is enough.
About LMFREE:
Documentation says: "If the data set is still open, LMFREE closes it."
But (my personal preference) I still would do a LMCLOSE before.
About the DELSTACK:
Documentation says: "deletes the most recently created data stack that was created by the NEWSTACK command".
If you have no NEWSTACK then you don't need DELSTACK.
Also, ADDRESS TSO is not necessary, as you have changed the environment 3 lines before.
Now, about the JCL...
You are running in batch without skeletons or panels, so you can put whatever works for ISPSLIB and ISPPLIB.
You don't run programs, so same thing for ISPLLIB.
Messages are another thing, you don't use them but ISPF still does, so using "SYS3.ISPMLIB" is still mandatory.
You don't work with ISPF tables, so you don't need ISPTABL.
As for ISPTLIB, why concatenate the same PDS twice ? Message ISPV010 says ISPF uses tables so I would use "SYS3.ISPTLIB":
| Quote: |
| ISPV010 Profile not loaded - Profile table 'aaaaaaaa' not read. Table service RC=bbbbbbbb. |
|
|
| Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2624 Location: Silicon Valley
|
|
|
|
| Code: |
DO FOREVER
"LMMLIST DATAID("DDVAR") OPTION(LIST) MEMBER(MEMNAME),
/* blah blah */
"LMFREE DATAID("DDVAR")"
END |
The LMMLIST uses the DATAID. It will work the first time in the loop, but you free it at the end of the loop. I do not think the second LMMLIST will work well. Perhaps move the LMFREE to be outside of the loop. And as Marso suggests, add the LMCLOSE (to also be outside of the loop). |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|