View previous topic :: View next topic
|
Author |
Message |
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Hi,
I have coded a rexx program to capture joblog from spool into a PS. Here is the code:
Code: |
/* REXX */
STRNG='JESYSMSG'
JOBNAME=Substr(FLIST.in,1,8)
JOBID=Substr(FLIST.in,10,8)
Say JOBNAME
Say JOBID
ADDRESS TSO
X = MSG("OFF")
TEMP=USERID()||'.TP.SDSF'
ADDRESS TSO
B=SYSDSN("'"TEMP"'")
If B = OK Then
"DELETE '"||TEMP||"'"
"ALLOC F(ISFIN) TRACKS SPACE(1) REU" /* USED BY SDSF */
"ALLOC F(ISFOUT) DA('"TEMP"') NEW",
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"
"ALLOC F(OUTDD) DA("OUTFIL") NEW CATALOG REU ",
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"
QUEUE "SET CONFIRM OFF"
QUEUE "OWNER *"
QUEUE "PREFIX *"
QUEUE "DA"
QUEUE "ST"
QUEUE "SELECT "JOBNAME JOBID
QUEUE "AFD REFRESH"
QUEUE "FIND "JOBNAME
QUEUE "++?"
QUEUE "FIND "STRNG
QUEUE "++S" /* BROWSE MSGUSR DATASET */
QUEUE "PRINT FILE OUTDD " /* PRINT TO TEMP DATASET */
QUEUE "PRINT 1 999999"
QUEUE "PRINT CLOSE"
QUEUE "END"
QUEUE "EXIT"
"EXECIO" QUEUED()" DISKW ISFIN (FINIS" /* INPUT TO SDSF BATCH */
"EXECIO * DISKW OUTDD(FINIS"
ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++32,255')" /* INVOKE SDSF */
A = MSG(X)
Exit
|
I am executing this rexx program in BATCH using following jcl,
Code: |
//STEP04 EXEC PGM=IKJEFT01,PARM='rexx pgm'
//SYSEXEC DD DSN= rexx lib,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//OUTDD DD DSN=output ps file name,
// DISP=(NEW,CATLG,DELETE),UNIT=DISK,
// DCB=(LRECL=133,RECFM=FB,BLKSIZE=0)
//SYSTSIN DD DUMMY
//SYSIN DD *
P473574G
JOB08484
/* |
I am getting EMPTY output file with the following message displayed in SYSTSPRT
Code: |
********************************* TOP OF DATA **********************************
P473574G
JOB08484
54 *-* ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++32,255')" /* INVOKE SDSF
+++ RC(-3) +++
READY
END
******************************** BOTTOM OF DATA ******************************** |
Could you please let me know where I am doing wrong in my REXX code?
Thanks in advance. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You are using ISPF services without allocating the ISPF libraries via the JCL.
However, I am very impressed that you have posted ALL of the information required to resolve this in your first post.
Well done
Other posters please take note |
|
Back to top |
|
|
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Thanks Expat,
Here onwards I will try to post all the required information for my queries.
I ran the job by allocating all ISPF libraries in JCL but still I got same output as I mentioned in my first post.
Could anyone suggest a solution for my problem?
Thanks! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Didn't notice earlier, but you do need to invoke ISPF to be able to use its services. Here's the PARM from an EXEC card I usually use.
Code: |
PARM='ISPSTART CMD(%REXX Pgm)' |
|
|
Back to top |
|
|
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Hi Expat,
I ran the job with your suggestion, i got following message
Code: |
********************************* TOP OF DATA **********
ISPI003 Following file was not preallocated:
ISPPROF
READY
END
******************************** BOTTOM OF DATA ******** |
Then updated my job with ISPPROF DD name then submitted
Now job is waiting for the dataset which I specified in ISPPROF dd name.
Any suggestions.
Thanks! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I usually use this
Code: |
//PROFLIST DD DSN=&&TEMPPROF,DISP=(,PASS,DELETE),
// SPACE=(TRK,(45,45,44)),
// RECFM=FB,LRECL=80
//ISPTLIB DD DSN=*.PROFLIST,DISP=SHR,VOL=REF=*.PROFLIST
....... other concats
//ISPTABL DD DSN=*.PROFLIST,DISP=SHR,VOL=REF=*.PROFLIST
....... other concats
//ISPPROF DD DSN=*.PROFLIST,DISP=SHR,VOL=REF=*.PROFLIST |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
but... wanting to use the settings in the online profile
my ispf batch procedure is a two step process
1) allocate a temporary PROFILE and copy into it the content of the GOOD profile
2) use the aforesaidtemporaryprofile in the ISPF step |
|
Back to top |
|
|
satish.ms10
Active User
Joined: 10 Aug 2009 Posts: 184 Location: India
|
|
|
|
Hi Expat,
I have modified the job as you suggested and ran the job but I got same error.
Hi Enrico,
I didn't understand what your suggested. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
|