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
 

 

problem with TSO STATUS and TSO OUTPUT commands in REXX

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

New User


Joined: 09 Dec 2005
Posts: 33

PostPosted: Tue Sep 12, 2006 4:07 pm    Post subject: problem with TSO STATUS and TSO OUTPUT commands in REXX
Reply with quote

Hi all,

I'm encountering a problem that's driving me nuts. In a REXX exec, I submit 1-n jobs, and then query their STATUS (WAITING, EXECUTING, ON OUTPUT), once the status is ON OUTPUT, I issue an OUTPUT command to store the SDSF output into a seq. file.

Problem is, the STATUS indicates that the job is on the output queue, however when I issue the OUTPUT, it comes back with NO HELD OUTPUT FOR JOB and a RC = 0.

What am I doing wrong here?

here's a bit of trace info to illustrate the problem:

961 *-* trace i
962 *-* x = OUTTRAP('JOBS.')
>L> "JOBS."
>F> "JOBS."
963 *-* "STATUS "job_nam.i"("job_num.i")"
>L> "STATUS "
>C> "JOB_NAM.1"
>V> "TCV0006X"
>O> "STATUS TCV0006X"
>L> "("
>O> "STATUS TCV0006X("
>C> "JOB_NUM.1"
>V> "JOB05672"
>O> "STATUS TCV0006X(JOB05672"
>L> ")"
>O> "STATUS TCV0006X(JOB05672)"
964 *-* y = OUTTRAP('OFF')
>L> "OFF"
>F> "OFF"
965 *-* if index(jobs.1,'ON OUTPUT') > 0
>V> "JOB TCV0006X(JOB05672) ON OUTPUT QUEUE"
>L> "ON OUTPUT"
>F> "24"
>L> "0"
>O> "1"
966 *-* then
*-* do
967 *-* say jobs.1
>V> "JOB TCV0006X(JOB05672) ON OUTPUT QUEUE"
JOB TCV0006X(JOB05672) ON OUTPUT QUEUE
968 *-* "OUTPUT "job_nam.i"("job_num.i") PRINT(LCHECK"i
>L> "OUTPUT "
>C> "JOB_NAM.1"
>V> "TCV0006X"
>O> "OUTPUT TCV0006X"
>L> "("
>O> "OUTPUT TCV0006X("
>C> "JOB_NUM.1"
>V> "JOB05672"
>O> "OUTPUT TCV0006X(JOB05672"
>L> ") PRINT(LCHECK"
>O> "OUTPUT TCV0006X(JOB05672) PRINT(LCHECK"
>V> "1"
>O> "OUTPUT TCV0006X(JOB05672) PRINT(LCHECK1"
NO HELD OUTPUT FOR JOB TCV0006X(JOB05672)
969 *-* frc=rc
>V> "0"
Back to top
View user's profile Send private message

nuck

New User


Joined: 09 Dec 2005
Posts: 33

PostPosted: Tue Sep 12, 2006 4:56 pm    Post subject:
Reply with quote

...I think I found the problem.....

I've added a simple delay loop (i.e. do j = 1 to 999) between the STATUS and the OUTPUT command. It would appear that the output from STATUS is not entirely correct, and a small delay is required before the SDSF output can be stored. icon_eek.gif
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 Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 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
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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