Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Printing spool details of a job to a dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Sathish Gurumoorthy

New User


Joined: 12 Feb 2009
Posts: 33
Location: Chennai, India

PostPosted: Mon Jun 01, 2009 5:34 pm    Post subject: Printing spool details of a job to a dataset
Reply with quote

Hi,
I use the below rexx code to print the spool output of a particular job to a dataset.

Code:
000001 /* REXX */                                                             
000002 ADDRESS TSO                                                             
000003 JOBNAME = 'TMS047BB'                                                       
000004 JOBID   = '7558'                                                         
000005 DSNAME = USERID()||"SP.OUTPUT"                                         
000007  "OUTPUT "JOBNAME"("JOBID") PRINT("DSNAME") BEGIN HOLD KEEP"


i get the error as " INVALID JOBNAME"

Code:
 INVALID JOBNAME, TMS047BB(7558)                           
 ***                                                       


The job is available in spool. Can anyone tell me why it is not printing the job spool to the dataset?
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Jun 01, 2009 5:49 pm    Post subject: Reply to: Printing spool details of a job to a dataset
Reply with quote

The format is:

JOBNAME(JOBnnnnn),

so try:

Code:

/* REXX */                                                             
JOBNAME = 'TMS047BB'                                                       
JOBID   = '07558'     
DSNAME = USERID()||".SP.OUTPUT"                                         
"OUTPUT "JOBNAME"(JOB"JOBID") PRINT('"DSNAME"') BEGIN HOLD KEEP"
Back to top
View user's profile Send private message
Sathish Gurumoorthy

New User


Joined: 12 Feb 2009
Posts: 33
Location: Chennai, India

PostPosted: Mon Jun 01, 2009 5:56 pm    Post subject:
Reply with quote

I tried with the above format and it says "Command is not a macro". The dataset isn't get printed with data.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Jun 01, 2009 6:01 pm    Post subject: Reply to: Printing spool details of a job to a dataset
Reply with quote

OK. Well, the code I posted was tested and does work correctly.

How about you post a run-time TRACE of your code, and maybe the results of a TSO STATUS command for the same job you want the OUTPUT for, just so we're all sure that the job really does exist on the held output spool.
Back to top
View user's profile Send private message
Sathish Gurumoorthy

New User


Joined: 12 Feb 2009
Posts: 33
Location: Chennai, India

PostPosted: Mon Jun 01, 2009 6:09 pm    Post subject:
Reply with quote

i tried the below code with TSO STATUS.
Code:
000001 /* REXX */                                                         
000002    TRACE R                                                         
000003 ADDRESS TSO                                                       
000004 JOBNAME = 'TMS047BB'                                               
000005 JOBID   = '7558'                                                   
000006 DSNAME = USERID()||"SP.OUTPUT"                                     
000007 "STATUS" JOBNAME"(JOB"JOBID")"                                     
000008 "OUTPUT "JOBNAME"(JOB"JOBID") PRINT("DSNAME") BEGIN HOLD KEEP"     


the trace results are
Code:
      3 *-* ADDRESS TSO                                                         
      4 *-* JOBNAME = 'TMS047BB'                                               
        >>>   "TMS047BB"                                                       
      5 *-* JOBID   = '7558'                                                   
        >>>   "7558"                                                           
      6 *-* DSNAME = USERID()||"SP.OUTPUT"                                     
        >>>   "TMS047SP.OUTPUT"                                                 
      7 *-* "STATUS" JOBNAME"(JOB"JOBID")"                                     
        >>>   "STATUS TMS047BB(JOB7558)"                                       
 JOB TMS047BB(JOB07558) ON OUTPUT QUEUE                                         
      8 *-* "OUTPUT "JOBNAME"(JOB"JOBID") PRINT("DSNAME") BEGIN HOLD KEEP"     
        >>>   "OUTPUT TMS047BB(JOB7558) PRINT(TMS047SP.OUTPUT) BEGIN HOLD KEEP"
  ***                                                                           
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Jun 01, 2009 6:13 pm    Post subject: Reply to: Printing spool details of a job to a dataset
Reply with quote

So it worked?? I don't see any errors.
Back to top
View user's profile Send private message
Sathish Gurumoorthy

New User


Joined: 12 Feb 2009
Posts: 33
Location: Chennai, India

PostPosted: Mon Jun 01, 2009 6:17 pm    Post subject:
Reply with quote

It still says 'Command is not a macro". Output dataset is not getting printed with data.
is there anything like we can't access SDSF via REXX like normal Rexx routines?
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2088
Location: Silicon Valley

PostPosted: Tue Jun 02, 2009 11:44 am    Post subject: Reply to: Printing spool details of a job to a dataset
Reply with quote

Quote:
It still says 'Command is not a macro".


I sounds like you are issuing your command from the editor command line. And the message is correct... it is not an editor macro. I think you just need to add "Address ISREDIT 'MACRO' " to make it an editor macro.

Quote:
is there anything like we can't access SDSF via REXX like normal Rexx routines?

Please rephrase your question... it is not clear what you are asking.
Back to top
View user's profile Send private message
Sathish Gurumoorthy

New User


Joined: 12 Feb 2009
Posts: 33
Location: Chennai, India

PostPosted: Tue Jun 02, 2009 12:05 pm    Post subject: Reply to: Printing spool details of a job to a dataset
Reply with quote

My question here is, can we access SDSF using Rexx in view/edit command lines? are we able to run edit macros to access SDSF only in SDSF panel?
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2088
Location: Silicon Valley

PostPosted: Tue Jun 02, 2009 8:31 pm    Post subject: Reply to: Printing spool details of a job to a dataset
Reply with quote

You should be able to use the rexx api of SDSF to get job output, and do it outside of SDSF panels. See IBM manual SG24-7419-00
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us