View previous topic :: View next topic
|
Author |
Message |
kokido
New User
Joined: 20 Jun 2024 Posts: 8 Location: Netherlands
|
|
|
|
Hello,
Currently working on rerouting printoutput with REXX/SDSF.
In my REXX I can nicely get the token that is associated with the spooldataset that is associated with a destination.
It seems that ISFACT does not let me reroute via PARM(dest newdest).
Code: |
Address SDSF "ISFACT H TOKEN('"TOKEN.rowix"') PARM(DEST newdest)"
|
Another way to do it would be via ISFEXEC or ISFSLASH, but then how do I pull out the specific spooldataset?
Code: |
Address SDSF ISFSLASH "$TO"Jxxxxx",OUTGRP=?.?.?,DEST="newdest
|
Help would be appreciated.
Kind regards,
Hans Kok |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
re: It seems that ISFACT does not let me reroute via PARM(dest newdest)
Perhaps provide here whatever message or return code that you got?? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
Can you explain how you got the token? My recollection is that you have to go to H panel to see a list of jobs, then issue a ? line command to show the individual output files for a particular job.
Don't you also need these two steps in your rexx program? |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
The combination
Address SDSF "ISFACT ST TOKEN('"TOKEN.jn"') PARM(NP SA)"
Address SDSF "ISFACT ST TOKEN('"TOKEN.jn"') PARM(NP ?) (prefix j_"
should give you everything that SDSF knows about the output.
Then assuming that the output has a something to distinguish itself, like a different output class, you can use the variable J_OGNAME.ix to build the $T command. Check the SDSF display for a job, it must have the O-Grp-N value something other than 1. |
|
Back to top |
|
|
kokido
New User
Joined: 20 Jun 2024 Posts: 8 Location: Netherlands
|
|
|
|
The rexx I use is generated with RGEN, with some filtering, and it gives me the output I want including the tokens, and jobid.
I chose the long way round and grab the OUTGRP from ULOG after a $DOJ….(LONG) command.
I find the REXX/RGEN combination nice, but the documentation is limited, it would be nice to have some more examples.
The code to pull out the OUTGRP I “borrowed” from the internet.
Thanks anyway |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
Here is an example which, for a given job, will route any output in output class 'C' to destination TEST.
Code: |
jobmask='TESTPRT '
rc = ISFCALLS('ON')
Address SDSF "ISFEXEC ST" jobmask
do jn=1 to jname.0
Address SDSF "ISFACT ST TOKEN('"TOKEN.jn"') PARM(NP ?)"
do dn=1 to ddname.0
if oclass.dn<>'C' then iterate
say 'Job' jname.jn jobid.jn 'output dsid' dsid.dn ,
'outclass' oclass.dn 'outgrp' ogname.dn 'will be rerouted'
Address SDSF,
"ISFSLASH '$TO"jobid.jn",OUTGRP="ogname.dn".1.1,DEST=TEST' (WAIT)"
end
end |
By the way, you were missing single quotes in your ISFSLASH command.
And I must emphasize that you need some distinguishing factor to identify the output, like output class.
SDSF will generate a lot of variables, but I think that they are all documented in the SDSF Users Guide. I often find it easier just to list them, using the REXXVARS program found at either 'https://harders-jensen.com' or at 'https://cbttape.org' in file 669. Sample: call rexxvars 'list var(job* *.5)'. |
|
Back to top |
|
|
kokido
New User
Joined: 20 Jun 2024 Posts: 8 Location: Netherlands
|
|
|
|
Thanks Willy for your reply, works quick and I see more possibilities now. |
|
Back to top |
|
|
|