I am trying to copy joblogs for any user onto members of a PDS.But I am facing issues using ReXX with TSO ST command.
I want to do the following:
1. type on command line TSO <rexx code name> <userid>
and copy the members to a PDS. I use:
Arg Id .
---then alloc dataset with--
If Sysdsn(Dsn) <> 'OK' Then
Do
"Alloc Ds('" || Out || "') Lrecl(134) Recfm(F b a) Cyl,
space(250,100) Dir(250) Blksize(0) rel f(input2)"
If Rc = 0 Then
Say 'Output PDS ' Out ' Created successfully..'
Else
Do
Say 'Output file creation failed .. RC: ' Rc
Exit
End
End
Else
"Alloc da('" || Out || "') f(Input2) Shr"
---then alloc dataset with--
If Sysdsn(Dsn) <> 'OK' Then
Do
"Alloc Ds('" || Out || "') Lrecl(134) Recfm(F b a) Cyl,
space(250,100) Dir(250) Blksize(0) rel f(input2)"
If Rc = 0 Then
Say 'Output PDS ' Out ' Created successfully..'
Else
Do
Say 'Output file creation failed .. RC: ' Rc
Exit
End
End
Else
"Alloc da('" || Out || "') f(Input2) Shr"
Now,I have to access other user's spool whose Id I used as Arg.So,
X = Outtrap('List.')
ADDRESS TSO
"STATUS Id"
X = Outtrap('OFF')
Then the prob comes.............STATUS doesn't take the Id value .
But a normal TSO STATUS <any user Id> returns the status of the jobs run under anyuser's Id.But, the same value is not here after STATUS.
Is there a way to pass the argument Id inside the OUTTRAP function?
Please help...