View previous topic :: View next topic
|
Author |
Message |
Sathish Gurumoorthy
New User
Joined: 12 Feb 2009 Posts: 33 Location: Chennai, India
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Sathish Gurumoorthy
New User
Joined: 12 Feb 2009 Posts: 33 Location: Chennai, India
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Sathish Gurumoorthy
New User
Joined: 12 Feb 2009 Posts: 33 Location: Chennai, India
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
So it worked?? I don't see any errors. |
|
Back to top |
|
|
Sathish Gurumoorthy
New User
Joined: 12 Feb 2009 Posts: 33 Location: Chennai, India
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
Sathish Gurumoorthy
New User
Joined: 12 Feb 2009 Posts: 33 Location: Chennai, India
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
|