SDSF in REXX



IBM's Command List programming language & Restructured Extended Executor

SDSF in REXX

Postby arshadhrashid » Thu Jan 26, 2012 5:34 am

Hi,
I would like to know the following if anyone has experience.

I have got the following REXX code, for saving the joblog of a job from SDSF to a member of a PDS dataset.
The name of the job is supplied as input.

PARSE ARG JOBNAME
PDS=KA.JES2LOGS <----------- My PDS name, alreday allocated.
ADDRESS TSO
"ALLOCATE FILE(ISFIN) TRACKS SPACE(1) REU"
"ALLOC F(ISFOUT) DA("PDS"("JOBNAME")) OLD REUSE"

QUEUE "OWNER *"
QUEUE "PREFIX *"
QUEUE "ST "
QUEUE "SELECT "JOBNAME
QUEUE "AFD REFRESSH"
QUEUE "FIND "JOBNAME " LAST"
QUEUE "++S"
QUEUE "PRT ODSN JES2LOGS("JOBNAME") * OLD"
QUEUE "PRINT 1 9999999"
QUEUE "PRINT CLOSE"
QUEUE "END"
QUEUE "END"
QUEUE "END"
QUEUE " "
"EXECIO" QUEUED()" DISKW ISFIN (FINIS "
ADDRESS ISPEXEC "SELECT PGM(SDSF) PARM('++60,132')"

The script works but it copies all the SDSF screens into the destination member.
I am only interested in getting the job log and not the output of the commands that are run before the job
is selected and opened.

Is there any way ?

Also I am not sure how come PGM(SDSF) call knows the input is in ISFIN and output will be wrttien to ISFOUT?

Would apprecaite anyone's help.
Thansk
arshadhrashid
 
Posts: 70
Joined: Tue Jul 28, 2009 5:03 am
Has thanked: 0 time
Been thanked: 0 time

Re: SDSF in REXX

Postby enrico-sorichetti » Thu Jan 26, 2012 10:31 am

see here for a smarter way
http://ibmmainframes.com/about54926.html
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: SDSF in REXX

Postby arshadhrashid » Sat Jan 28, 2012 5:23 am

thanks for your help. Could not find in the manual what I was looking for but found the folloiwng JCL to do the exact same thing.
I think its a better of achieveing this, so I am posting it for every one's benefits. The only draw-back is, since thsi is JCL so jobname can not be supplied from
prompt line an dyou have to modify JCL each time to enter a new JOBNAME.

//BSDSF EXEC PGM=SDSF
//REPORT DD DISP=(OLD,CATLG,),DSN=HLQ.KA.SDSFOUT,
// SPACE=(CYL,(1,1)),RECFM=FB,LRECL=133,BLKSIZE=0
//ISFIN DD *
ST
PRE JOBNAME
FIND JOBNAME
++?
FIND JESMSGLG
++S
PRINT FILE REPORT
PRINT 1 9999
PRINT CLOSE
END
EXIT
//ISFOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
arshadhrashid
 
Posts: 70
Joined: Tue Jul 28, 2009 5:03 am
Has thanked: 0 time
Been thanked: 0 time

Re: SDSF in REXX

Postby enrico-sorichetti » Sun Jan 29, 2012 4:09 pm

I think its a better of achieveing this, so I am posting it for every one's benefits.


NO, the best way is to make use of the smarter REXX SDSF interface

the way You are doing it, You just issue a bunch of commands in the hope that everything will be right

with the smart REXX SDSF interface You are always in control for error checking and corrective actions.
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post