Discussion:
JES2 Spool Data Set Browse (SDSB) sample
(too old to reply)
Chris Cantrell
2018-08-16 13:44:43 UTC
Permalink
Raw Message
Does anyone have a somple program which reads the currently running jobs JCL using the Spool Data Set Browse (SDSB) function? I would be extremely greatful in anyone could post a sample! Thanks!

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Lizette Koehler
2018-08-16 13:52:39 UTC
Permalink
Raw Message
What problem are you trying to solve?

What level of JES2 are you at?

There are now a lot of features using ISFEXEC in REXX.

Lizette
-----Original Message-----
Chris Cantrell
Sent: Thursday, August 16, 2018 6:45 AM
Subject: JES2 Spool Data Set Browse (SDSB) sample
Does anyone have a somple program which reads the currently running jobs JCL
using the Spool Data Set Browse (SDSB) function? I would be extremely
greatful in anyone could post a sample! Thanks!
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Chris Cantrell
2018-08-16 14:00:22 UTC
Permalink
Raw Message
We are on release 2.2. I am wanting to read the JCL in the first step of the job and perform very specific (which may change) verifications to the JCL and abend the job if the 'standards' are not met.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
b***@gmail.com
2018-08-17 17:13:20 UTC
Permalink
Raw Message
Post by Chris Cantrell
We are on release 2.2. I am wanting to read the JCL in the first step of the job and perform very specific (which may change) verifications to the JCL and abend the job if the 'standards' are not met.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
Why wouldn't you use a JES2 exit for this?

Bob
b***@gmail.com
2018-08-17 17:13:54 UTC
Permalink
Raw Message
Post by Chris Cantrell
We are on release 2.2. I am wanting to read the JCL in the first step of the job and perform very specific (which may change) verifications to the JCL and abend the job if the 'standards' are not met.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
Why wouldn't you use a JES2 exit for this?

Bob
Ed Jaffe
2018-08-19 19:52:06 UTC
Permalink
Raw Message
Post by Chris Cantrell
We are on release 2.2. I am wanting to read the JCL in the first step of the job and perform very specific (which may change) verifications to the JCL and abend the job if the 'standards' are not met.
It's pretty trivial if you already know how to do allocation via SVC99.
Looking at (E)JES code, I see we use the following keys:

DALRTDDN (let the system choose DD name)
DALDSNAM (owner.jobname.jobid.dsnum.dsname)
DALSTATS (SHR)
DALSSREQ (technically only needed for secondary JES)
DALRECFM
DALLRECL
DALPERMA
DALCLOSE (same as FREE=CLOSE)
DALBRTKN (see mapping macro IAZBTOKP)

Good luck!
--
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/

--------------------------------------------------------------------------------
This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Ed Jaffe
2018-08-19 20:19:35 UTC
Permalink
Raw Message
Post by Ed Jaffe
DALSSREQ (technically only needed for secondary JES)
Actually, I think it's probably required for spool browse and optional
when submitting to internal reader.
--
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/

--------------------------------------------------------------------------------
This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Charles Mills
2018-08-16 14:20:49 UTC
Permalink
Raw Message
A short answer is check out the SSI (Subsystem Interface) manual. Not for the feint-hearted.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Chris Cantrell
Sent: Thursday, August 16, 2018 8:45 AM
To: IBM-***@LISTSERV.UA.EDU
Subject: JES2 Spool Data Set Browse (SDSB) sample

Does anyone have a somple program which reads the currently running jobs JCL using the Spool Data Set Browse (SDSB) function? I would be extremely greatful in anyone could post a sample! Thanks!

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Steely.Mark
2018-08-16 15:04:56 UTC
Permalink
Raw Message
What about this:

//JS010 EXEC PGM=SDSF
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//SYSIN DD DUMMY
//FILEOUT DD DSN=xxxx.xxxx.SEARCH,DISP=(,CATLG,DELETE),
// UNIT=3390,SPACE=(CYL,(10,1)),
// DCB=(RECFM=FB,LRECL=134,BLKSIZE=0)
//*ISFOUT DD SYSOUT=*
//ISFOUT DD DUMMY
//ISFIN DD *
PREFIX CICS*
DA
F 'CICSPXX1'
++?
F 'JESMSGLG'
++S
PRINT FILE FILEOUT
PRINT
DA
F 'CICSPXX2'
++?
F 'JESMSGLG'
++S
PRINT FILE FILEOUT
PRINT
DA
F 'CICSPXX3'
++?
F 'JESMSGLG'
++S
PRINT FILE FILEOUT
PRINT
DA
F 'CICSPXX4'
++?
F 'JESMSGLG'
++S
PRINT FILE FILEOUT
PRINT
DA
F 'CICSPXX5'
++?
F 'JESMSGLG'
++S
PRINT FILE FILEOUT
PRINT
DA
F 'CICSPXX6'
++?
F 'JESMSGLG'
++S
PRINT FILE FILEOUT
PRINT
PRINT CLOSE
//*

This prints the JESMSGLG put you could change that to JESJCL.

Thanks

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Charles Mills
Sent: Thursday, August 16, 2018 9:21 AM
To: IBM-***@LISTSERV.UA.EDU
Subject: Re: JES2 Spool Data Set Browse (SDSB) sample

A short answer is check out the SSI (Subsystem Interface) manual. Not for the feint-hearted.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Chris Cantrell
Sent: Thursday, August 16, 2018 8:45 AM
To: IBM-***@LISTSERV.UA.EDU
Subject: JES2 Spool Data Set Browse (SDSB) sample

Does anyone have a somple program which reads the currently running jobs JCL using the Spool Data Set Browse (SDSB) function? I would be extremely greatful in anyone could post a sample! Thanks!

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN

*** Disclaimer ***
This communication (including all attachments) is solely for the use of the person to whom it is addressed and is a confidential AAA communication. If you are not the intended recipient, any use, distribution, printing, or copying is prohibited. If you received this email in error, please immediately delete it and notify the sender.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Kirk Wolf
2018-08-16 16:26:26 UTC
Permalink
Raw Message
Post by Charles Mills
A short answer is check out the SSI (Subsystem Interface) manual. Not for
the feint-hearted.
You don't need to use the SSI to read a spool data set, although you do
need a way to get the JES SSID and jobid (like from the current JSAB).

It is not too complicated: you just allocate it using SVC99 (and some
special purpose keys) and open the DD with either a DCB or ACB.
See Chapter 2 in "z/OS JES Application Programming" - JES Spool Data Set
Browse

Kirk Wolf
Dovetailed Technologies
http://dovetail.com

PS> You can use our free Co:Z Utilities in batch to read any spool file and
pass the data to your program.
For example:

//SHELL EXEC PGM=COZBATCH
//STDIN DD * # Run z/OS UNIX login shell

# get the 8 character jobid of the current job
jobid=$(echo $JES_SYS_CORR_CURRJOB | cut -c1-8)

fromdsn -jes.$jobid.jesjclin |
awk myreport.awk # or your program that reads from /dev/stdin
//

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Charles Mills
2018-08-16 16:46:56 UTC
Permalink
Raw Message
Didn't the OP want to change the dataset?



CharlesSent from a mobile; please excuse the brevity.
Post by Charles Mills
A short answer is check out the SSI (Subsystem Interface) manual. Not for
the feint-hearted.
You don't need to use the SSI to read a spool data set, although you do
need a way to get the JES SSID and jobid (like from the current JSAB).

It is not too complicated: you just allocate it using SVC99 (and some
special purpose keys) and open the DD with either a DCB or ACB.
See Chapter 2 in "z/OS JES Application Programming" - JES Spool Data Set
Browse

Kirk Wolf
Dovetailed Technologies
http://dovetail.com

PS> You can use our free Co:Z Utilities in batch to read any spool file and
pass the data to your program.
For example:

//SHELL EXEC PGM=COZBATCH
//STDIN     DD *    # Run z/OS UNIX login shell

# get the 8 character jobid of the current job
jobid=$(echo $JES_SYS_CORR_CURRJOB | cut -c1-8)

fromdsn -jes.$jobid.jesjclin  |
    awk myreport.awk      # or your program that reads from /dev/stdin
//

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Charles Mills
2018-08-16 17:15:58 UTC
Permalink
Raw Message
Nope, I mis-recalled. He wants the first jobstep to read its own JCL. Simpler answers than SSI should work. 



CharlesSent from a mobile; please excuse the brevity.
-------- Original message --------From: Charles Mills <***@MCN.ORG> Date: 8/16/18 11:46 AM (GMT-06:00) To: IBM-***@LISTSERV.UA.EDU Subject: Re: JES2 Spool Data Set Browse (SDSB) sample
Didn't the OP want to change the dataset?



CharlesSent from a mobile; please excuse the brevity.
Post by Charles Mills
A short answer is check out the SSI (Subsystem Interface) manual. Not for
the feint-hearted.
You don't need to use the SSI to read a spool data set, although you do
need a way to get the JES SSID and jobid (like from the current JSAB).

It is not too complicated: you just allocate it using SVC99 (and some
special purpose keys) and open the DD with either a DCB or ACB.
See Chapter 2 in "z/OS JES Application Programming" - JES Spool Data Set
Browse

Kirk Wolf
Dovetailed Technologies
http://dovetail.com

PS> You can use our free Co:Z Utilities in batch to read any spool file and
pass the data to your program.
For example:

//SHELL EXEC PGM=COZBATCH
//STDIN     DD *    # Run z/OS UNIX login shell

# get the 8 character jobid of the current job
jobid=$(echo $JES_SYS_CORR_CURRJOB | cut -c1-8)

fromdsn -jes.$jobid.jesjclin  |
    awk myreport.awk      # or your program that reads from /dev/stdin
//

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Paul Gilmartin
2018-08-16 14:36:56 UTC
Permalink
Raw Message
Post by Chris Cantrell
We are on release 2.2. I am wanting to read the JCL in the first step of the job and perform very specific (which may change) verifications to the JCL and abend the job if the 'standards' are not met.
Is SDSF an option?

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Chris Cantrell
2018-08-16 14:43:03 UTC
Permalink
Raw Message
I want to read the JCL for the job as it is running. I want to execute a program as the first step that reads the JCL of the actual job that it is being executed in.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Dyck, Lionel B. , RavenTek
2018-08-16 14:50:53 UTC
Permalink
Raw Message
If you have SDSF, or similar ISV product, then you should be able to 'extract' the JESJCLIN or JESJCL or any other spool file and process it.

--------------------------------------------------------------------------
Lionel B. Dyck (Contractor) <sdg><
Mainframe Systems Programmer – RavenTek Solution Partners


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Chris Cantrell
Sent: Thursday, August 16, 2018 9:43 AM
To: IBM-***@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: JES2 Spool Data Set Browse (SDSB) sample

I want to read the JCL for the job as it is running. I want to execute a program as the first step that reads the JCL of the actual job that it is being executed in.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Paul Gilmartin
2018-08-16 19:13:17 UTC
Permalink
Raw Message
Post by Kirk Wolf
You don't need to use the SSI to read a spool data set, although you do
need a way to get the JES SSID and jobid (like from the current JSAB).
It is not too complicated: you just allocate it using SVC99 (and some
special purpose keys) and open the DD with either a DCB or ACB.
See Chapter 2 in "z/OS JES Application Programming" - JES Spool Data Set
Browse
Is the Rexx API to SDSF available outside TSO? E.g. in IRXJCL?
(The hard part may be discovering your own JOBID.)
Post by Kirk Wolf
PS> You can use our free Co:Z Utilities in batch to read any spool file and
pass the data to your program.
//SHELL EXEC PGM=COZBATCH
//STDIN DD * # Run z/OS UNIX login shell
# get the 8 character jobid of the current job
jobid=$(echo $JES_SYS_CORR_CURRJOB | cut -c1-8)
fromdsn -jes.$jobid.jesjclin |
awk myreport.awk # or your program that reads from /dev/stdin
-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
scott Ford
2018-08-19 17:57:03 UTC
Permalink
Raw Message
You can in Rexx and SDSF , we do it via our DevOPS process we use from
bitbucket where our source and CI processes are stored.
It takes some work..but works well,

Scott

On Thu, Aug 16, 2018 at 3:13 PM Paul Gilmartin <
Post by Paul Gilmartin
Post by Kirk Wolf
You don't need to use the SSI to read a spool data set, although you do
need a way to get the JES SSID and jobid (like from the current JSAB).
It is not too complicated: you just allocate it using SVC99 (and some
special purpose keys) and open the DD with either a DCB or ACB.
See Chapter 2 in "z/OS JES Application Programming" - JES Spool Data Set
Browse
Is the Rexx API to SDSF available outside TSO? E.g. in IRXJCL?
(The hard part may be discovering your own JOBID.)
Post by Kirk Wolf
PS> You can use our free Co:Z Utilities in batch to read any spool file
and
Post by Kirk Wolf
pass the data to your program.
//SHELL EXEC PGM=COZBATCH
//STDIN DD * # Run z/OS UNIX login shell
# get the 8 character jobid of the current job
jobid=$(echo $JES_SYS_CORR_CURRJOB | cut -c1-8)
fromdsn -jes.$jobid.jesjclin |
awk myreport.awk # or your program that reads from /dev/stdin
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
--
Scott Ford
IDMWORKS
z/OS Development

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
w***@gmail.com
2018-08-17 07:53:22 UTC
Permalink
Raw Message
This REXX/SDSF sample reads and shows the JCLMSG file from the running job (assuming that there is only one active job with the name). It runs under IRXJCL in newer ZOSs that allows EXECIO to be run outside ADDRESS TSO.

n=isfcalls('ON')

isfprefix=mvsvar('symdef','jobname')
say 'I am:' isfprefix
Address SDSF
"ISFEXEC ST"
if rc<>0 then call SdsfErr 'ST'

do i=1 to jobid.0 until ap<>0
ap=(queue.i='EXECUTION')
end
if ap=0 then call close 8 'Job(s) not found in print or execute'

"ISFACT ST TOKEN('"TOKEN.ap"') PARM(NP SA)"
if rc<>0 then call SdsfErr 'ST NP SA'
do jx=1 to isfddname.0
if right(isfdsname.jx,6)='JESJCL' then do
Address MVS "EXECIO * DISKR" isfddname.jx "(STEM line. FINIS)"
if rc<>0 then call close 8 'read rc' rc
Say " Lines read:" line.0
do kx = 1 to line.0
Say line.kx
end
Call close 0
end
end
Call Close 4 'JCLMSG not found'

Close:
parse arg _rc _msg
if _msg<>'' then say _msg
Exit word(_rc 0,1)

SdsfErr:
say arg(1)':' isfmsg
say isfdisplay
do i=1 to isfmsg2.0
say isfmsg2.i
end
call close 12

Willy
Paul Gilmartin
2018-08-19 19:41:10 UTC
Permalink
Raw Message
Post by scott Ford
You can in Rexx and SDSF , we do it via our DevOPS process we use from
bitbucket where our source and CI processes are stored.
It takes some work..but works well,
There are some examples at or about:
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.isfa600/rxbrs1.htm
z/OS IBM SDSF User's Guide Version 2 Release 3 SC27-9028-30
... the essence is that SDSF will allocate a DDNAME for you which you
can read with EXECIO (directly) or IEBGENER (e.g., with alternate DDNAME list).

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Paul Gilmartin
2018-08-19 20:21:38 UTC
Permalink
Raw Message
Post by Ed Jaffe
It's pretty trivial if you already know how to do allocation via SVC99.
DALRTDDN (let the system choose DD name)
DALDSNAM (owner.jobname.jobid.dsnum.dsname)
DALSTATS (SHR)
DALSSREQ (technically only needed for secondary JES)
DALRECFM
DALLRECL
DALPERMA
DALCLOSE (same as FREE=CLOSE)
DALBRTKN (see mapping macro IAZBTOKP)
Absent DALSSREQ, what tells DYNALLOC that this is a request for a spool file rather
than an ordinary data set? Perhaps that DALDSNAM contains a qualifier (dsnum?)
that would be invalid otherwise?

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Charles Mills
2018-08-19 21:14:57 UTC
Permalink
Raw Message
I did not know/think that DALSSREQ was optional. 
Certainly the name is unique and is not a cataloged DSN. 

CharlesSent from a mobile; please excuse the brevity.
Post by Ed Jaffe
It's pretty trivial if you already know how to do allocation via SVC99.
DALRTDDN (let the system choose DD name)
DALDSNAM (owner.jobname.jobid.dsnum.dsname)
DALSTATS (SHR)
DALSSREQ (technically only needed for secondary JES)
DALRECFM
DALLRECL
DALPERMA
DALCLOSE (same as FREE=CLOSE)
DALBRTKN (see mapping macro IAZBTOKP)
Absent DALSSREQ, what tells DYNALLOC that this is a request for a spool file rather
than an ordinary data set?  Perhaps that DALDSNAM contains a qualifier (dsnum?)
that would be invalid otherwise?

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Loading...