Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Copy JCL's from Spool(SDSF)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Mon Nov 30, 2009 4:29 pm    Post subject: Copy JCL's from Spool(SDSF)
Reply with quote

Hi Experts,

I am trying to copy JCL's of given JOBID's to a PDS.For that I am first writing a simple JCL to copy a single job from a spool to a PS but it is copying all data corresponding to DD names but not copying the job.

Is there any way to do this?

Below is the JCL that I used.

//SDSFOUT EXEC PGM=SDSF
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//ISFOUT DD SYSOUT=*
//ISFIN DD *
PRE TXXXSOR*
H
SELECT TJNLSORT JOBID JOB38139
FIND TXXXSORT LAST
++S
PRINT ODSN 'RACFID.TEST.OUTPUT1'
PRINT 1 99999
PRINT CLOSE
END
END
/*
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 30, 2009 5:10 pm    Post subject:
Reply with quote

Pleas explain what you mean, show an example of what is actually being copied.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Mon Nov 30, 2009 5:17 pm    Post subject: Reply to: Copy JCL's from Spool(SDSF)
Reply with quote

a quick and dirty search for ibm redbooks sdsf rexx will take You

to
http://www.redbooks.ibm.com/abstracts/sg247419.html

and a click on the additional material link
to
ftp://www.redbooks.ibm.com/redbooks/SG247419/

were You can download the sources of the samples
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Mon Nov 30, 2009 5:44 pm    Post subject:
Reply with quote

@Expat

The output dataset is having following screen info

JESMSGLG
JESJCL
JESYSMSG
SDSF PRIMARY OPTION MENU
SDSF PRIMARY OPTION MENU
SDSF HELD OUTPUT DISPLAY ALL CLASSES LINES
SDSF HELD OUTPUT DISPLAY ALL CLASSES LINES
SDSF HELD OUTPUT DISPLAY ALL CLASSES LINES
JESMSGLG
JESJCL
JESYSMSG
SDSF PRIMARY OPTION MENU
Total 717 lines.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Mon Nov 30, 2009 5:56 pm    Post subject:
Reply with quote

@enrico-sorichetti


I have already gone through the redbook of SDFS REXX but I wasn't not able to find anything meeting with my criteria.The book did have information about "xdc" through REXX but what I want is instead of "xdc" there should be a "sj" and then "cut" and then write the job to a PS or PDS
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Mon Nov 30, 2009 6:03 pm    Post subject: Reply to: Copy JCL's from Spool(SDSF)
Reply with quote

the requirements should set the final result,
it' s just silly to put a requirement also on the way to obtain it..

do You have a physician prescription to use sj
when better ways are available...

did You look at chapter 2 of the redbook
Quote:
This chapter describes a scenario, BUILDPDS, that copies SYSOUT data from a group of jobs to members of a partitioned data set (PDS). The scenario, BUILDPDS, accepts a number of job selection criteria and, through the REXX with SDSF API, locates and transfers SYSOUT records written to a specific DDNAME.
This scenario can be valuable to anyone interested in capturing a series of reports for further processing.
For more information about how to obtain the program source for this scenario, see Appendix B, “Additional material” on page 305.

the scenario is a bit more complicated than Yours bu apart the PDS management You should be able to use the SDSF output retrieval logic

using the rexx sdsf interface You control the logic using the old way of doing things the control You have on the is very skimpy, or better said, almost non existent
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Mon Nov 30, 2009 6:20 pm    Post subject:
Reply with quote

@enrico-sorichetti

Thanks for your quick response.

I am new to REXX and I have tried whatever I could have tried but it is not working icon_sad.gif . I have given my JCL also.

Still I am not clear with what you have quoted that how it meets my requirement. According to my understanding the quoted scenerio will be helpful only in copying the SYSOUT to a dataset ,not in creating the PDS or a PS of the JCL which generated that SYSOUT.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Mon Nov 30, 2009 7:07 pm    Post subject: Reply to: Copy JCL's from Spool(SDSF)
Reply with quote

Your understanding is not complete,
the chapter 2 ( which I quoted) speaks explicitly about building a PDS and creating members with some data extracted from the spool
BUILDPDS in the quoted chapter should hint something !!

to better undertand the scripts iy might be better to unload the additional material

furthermore in Your original post You never told abou sj, but simpli about a generic output

You cannot use sj in a rexx script, but You can use SJA
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Mon Nov 30, 2009 11:45 pm    Post subject:
Reply with quote

can I do copy and paste to PDS after doing SJA.

Like below

//SDSFOUT EXEC PGM=SDSF
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//ISFOUT DD SYSOUT=*
//ISFIN DD *
PRE TXXXSOR*
H
SELECT TJNLSORT JOBID JOB38139
FIND TXXXSORT LAST
++S
SJA
CUT
<open pds>
PASTE
END
END
/*

Will the above code work.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 5 Thu Apr 27, 2017 1:15 am
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts SDSF and SAF security danik56 TSO/ISPF 3 Wed Mar 15, 2017 12:51 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us