IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copy JCL's from Spool(SDSF)


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Nov 30, 2009 5:10 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Nov 30, 2009 5:17 pm
Reply with quote

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

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

and a click on the additional material link
to
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Nov 30, 2009 6:03 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Nov 30, 2009 7:07 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts XDC SDSF output to temp dataset CLIST & REXX 4
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
Search our Forums:

Back to Top