how to take backup of jobs ran in SDSF(spool) into a PDS



IBM's Command List programming language & Restructured Extended Executor

how to take backup of jobs ran in SDSF(spool) into a PDS

Postby sammouse » Thu Aug 07, 2008 2:24 pm

Below shown is the spool area (SDSF)

NP JOBNAME JobID Owner Prty Queue C Pos SAff ASys
HFW21 JOB35266 OPHFW 1 PRINT B 292
HFW22 JOB47606 OTS4S 1 PRINT 0 633
HFW24a JOB47605 OTS4S 1 PRINT 0 638
HFW25 JOB49146 OPHFW 1 PRINT B 1057
.
.
.etc..

I tried with the below code to copy the content of 1 job into PS file and was successful. Could anybody please guide me to copy all the jobs as listed above (say HFW21,HFW22,HFW24A,HFW25.....etc) into a PDS as a member. I should have all the members of HFW copied into 1 PDS. What are the Changes I have to do to the below code to complete my requirement.

/* rexx */                                                             
ADDRESS TSO                                                             
"ALLOC F(ISFIN) TRACKS SPACE(1) REU"             
 "ALLOC F(ISFOUT) NEW DELETE REU " ,             
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"               
"ALLOC F(TEMPPRT) DA('DAAA.REXX.JOB3') SHR"                             
QUEUE "PRE HFW44"                     
QUEUE "ST"                                                             
QUEUE "FILTER JOBID EQ " JOB20254                                       
QUEUE "++S"                               
QUEUE "PRINT FILE TEMPPRT "                 
QUEUE "PRINT 1 999999"                                                 
QUEUE "PRINT CLOSE"                                                     
QUEUE "END"                                                             
QUEUE "EXIT"                                                           
SAY QUEUE                                                               
"EXECIO" QUEUED()" DISKW ISFIN (FINIS"     
 ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++32,255')"
EXIT
sammouse
 
Posts: 9
Joined: Wed Aug 06, 2008 8:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how to take backup of jobs ran in SDSF(spool) into a PDS

Postby Pedro » Thu Aug 07, 2008 9:57 pm

You might try using the STATUS and OUTPUT commands instead of using SDSF.

----
Your sample only prints a specific job, because your FILTER command specifies a specific job number.
QUEUE "FILTER JOBID EQ " JOB20254                                       
QUEUE "++S"                               
QUEUE "PRINT FILE TEMPPRT "                 
QUEUE "PRINT 1 999999"                                                 
QUEUE "PRINT CLOSE"                                                     
QUEUE "END" 

To print all jobs you would need to:

1. make the above code a subroutine and the jobid a parameter that is passed in.
2. issue the PRINT from the ST display,
3. read back the list of jobs, parse out the jobids, then call the new subroutine.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: how to take backup of jobs ran in SDSF(spool) into a PDS

Postby sammouse » Fri Aug 08, 2008 11:32 am

Hi pedro,
Can u explain me elaboratly ,bcoz i am new to rexx.
sammouse
 
Posts: 9
Joined: Wed Aug 06, 2008 8:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how to take backup of jobs ran in SDSF(spool) into a PDS

Postby Pedro » Fri Aug 08, 2008 10:43 pm

Can u ... bcoz i am

Please do not use chat slang. This is a technical forum. Your questions need to posed clearly. Also, not all are native English speakers.

In your sample program, I think if you remove:
QUEUE "FILTER JOBID EQ " JOB20254                                       
QUEUE "++S"

you will get a list of jobs from your ST display into a dataset. Read that dataset to get a list of jobs.

Please read the TSO/E Rexx Reference, regarding EXECIO command.
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: how to take backup of jobs ran in SDSF(spool) into a PDS

Postby sammouse » Tue Aug 12, 2008 9:14 am

Hi pedro,
Thanks for the reply once again.i removed the two lines as you mentioned below

" In your sample program, I think if you remove:
QUEUE "FILTER JOBID EQ " JOB20254
QUEUE "++S"
you will get a list of jobs from your ST display into a dataset.
"


...but its not working .now the output file is empty.no jobs are stored in it.

can you help me how to proceed further.
sammouse
 
Posts: 9
Joined: Wed Aug 06, 2008 8:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how to take backup of jobs ran in SDSF(spool) into a PDS

Postby Pedro » Tue Aug 12, 2008 9:54 pm

In the rexx program, you are issuing the commands much like you would from your ISPF session.

What happens when you logon to TSO, start ISPF, get into SDSF, and issue these commands, one after the other?
TSO ALLOC F(TEMPPRT) DA('DAAA.REXX.JOB3') SHR
PRE HFW44"                     
ST     
PRINT FILE TEMPPRT             
PRINT 1 999999                                               
PRINT CLOSE       


1. Are there jobs shown when you issue ST command?
2. What is in your 'DAAA.REXX.JOB3' dataset?
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: how to take backup of jobs ran in SDSF(spool) into a PDS

Postby sammouse » Wed Aug 13, 2008 5:18 pm

Hi pedro,
Thanks for the reply once again.

1. Are there jobs shown when you issue ST command?
Yes,when i issue the command ST, i can see the jobs in spool.

2. What is in your 'DAAA.REXX.JOB3' dataset?

it is used to store the output.

i can store only one output in this PS file.i need to take backup for all the jobs which ran in SDSF.

is there any manual for SDSF ???
sammouse
 
Posts: 9
Joined: Wed Aug 06, 2008 8:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how to take backup of jobs ran in SDSF(spool) into a PDS

Postby Pedro » Wed Aug 13, 2008 11:16 pm

Earlier you said:
...but its not working .now the output file is empty.no jobs are stored in it.

Now you say:
i can store only one output in this PS file

Does that mean it is working now?

You have your choice of:
1. allocate a different PS file each time.
2. allocate a PDS and save to a member for each job.
3. use a PS, but allocate with MOD instead of SHR or OLD. MOD will cause next job to append at the end of the dataset.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post