View previous topic :: View next topic
|
Author |
Message |
AllenSieracki
New User
Joined: 10 Apr 2020 Posts: 12 Location: USA
|
|
|
|
Is there a way to submit a print job of a PDS member simply by browsing the PDS in ISPF and entering a line command next to the member? I understand that using P will send the member to the list data set and then after exiting ISPF a print job could be run to get the list data set printed but this seems like a lot of steps. Would it be possible for instance to create a custom line command - say PP that would just send the member to my previously designated printer all in one step?
Thanks very much,
Allen |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2119 Location: USA
|
|
Back to top |
|
|
AllenSieracki
New User
Joined: 10 Apr 2020 Posts: 12 Location: USA
|
|
|
|
Thanks sergeyken. I do know how to submit a job from ISPF.
This is a little bit more complicated. I am trying to see if it is possible to print a member with a line simple line command. Not sure but I think this would involve a CLIST or REXX exec that would grab the member, update JCL in a print program and submit a job such that the member would be printed at my remote printer all with one simple line command. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 724 Location: Denmark
|
|
|
|
Sure it is possible, it will require a couple of REXX (or CLIST) lines. I would look at the TSO PRINT command before building a job (hint - TSO HELP PRINT).
The REXX will have the dataset and member as parm. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 724 Location: Denmark
|
|
|
|
The command is PRINTDS, not PRINT, sorry. |
|
Back to top |
|
|
AllenSieracki
New User
Joined: 10 Apr 2020 Posts: 12 Location: USA
|
|
|
|
Thanks very much for the hint Willy.
I've looked at the PRINTDS command and will try some testing to see if I can get it to print to our remote printers. We currently use what I think is a TSO command for printing - VP
It has the format:
VP 'XXXX.XXXXXXX(XXXXXX)' [printer queue name]
This works for both of our remote printers. I assume for the purposes of what I am trying to do it should be possible to use this as an alternative to PRINTDS.
I'm just beginning to play around with CLISTs and have even less knowledge of REXX. Is there a CLIST command that I could use to capture the member name adjacent to the cursor in a browsed PDS? It did some searches and didn't come up with much. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1306 Location: Bamberg, Germany
|
|
|
|
You probably could try this. Name the snippet as 'PP' somewhere in your SYSPROC concatination (best your own <uid>.REXX.EXEC) and give it a go as Line Command. It may work or not.
Code: |
/* REXX */
arg dsn
"ISPEXEC CONTROL ERRORS RETURN"
"ISPEXEC SELECT CMD(%VP """dsn""")"
exit rc
|
|
|
Back to top |
|
|
AllenSieracki
New User
Joined: 10 Apr 2020 Posts: 12 Location: USA
|
|
|
|
Thanks very much Joerg. I created a member using your example:
userid.REXX.EXEC(LPP)
I backed out and tried entering LPP next to the member and got the message:
COMMAND LPP NOT FOUND
I tried backing out of ISPF to the READY prompt and went back in thinking that maybe members in my REXX.EXEC library don't get inventoried automatically but it didn't help - same error. Do I need to make the system aware of my REXX.EXEC library? Apologies for maybe not having the terminology right. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1306 Location: Bamberg, Germany
|
|
|
|
Have a look right here in the forum about adding libraries to the search. Use if possible the same DCB attributes for your library as are the ones in the SYSEXEC/SYSPROC. I assume it will be FB;80 or something rather than VB;255
You can view your active concatenation using TSO ISRDDN |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
You need to make sure that you personal rexx library is annocated and you also have to add the command to the command table. I have never done that, just read about it
What is more, I am not sure if you can add line commands that way. I would have to check the manual but you can do that. I don't - I only use rexx on my PCs. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1306 Location: Bamberg, Germany
|
|
|
|
It doesn't have to in the command table if it is found in the SYSPROC/SYSEXEC. The command how it is wanted to be used is just issued against the member name and getting it as arguments (what's what I have tried with my code snippet). |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 724 Location: Denmark
|
|
|
|
You can use own commands directly from ISPF member list - 3.4 then use linecmd M. The commands must of course be available through concatenation SYSEXEC.
Then something like this should work:
/* rexx */
Address TSO "%VP" arg(1) "dest... etc etc"
Yeah I know that the Address TSO is superfluous, but it makes it clearer I think. |
|
Back to top |
|
|
AllenSieracki
New User
Joined: 10 Apr 2020 Posts: 12 Location: USA
|
|
|
|
Thank you Nic, Willy, Joerg for all very much for the input.
I have been looking at how to add my library to the search. I have issued the command:
TSO ISRDDN
I see several entries for SYSEXEC and SYSPROC. None of them appear to include personal user ids. I was sort of expecting to see other users that had added their own libraries to the search here but maybe I am not understanding how this works. Are the SYSEXEC and SYSPROC lists specific to just my user id or are they system wide? I would feel comfortable adding my REXX exec (from Joerg) to the list if it is for my personal use but if it could possibly impact others, I would want to ask my support for permission and guidance on this. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1306 Location: Bamberg, Germany
|
|
|
|
There are some that are allocated when you LOGON (so for all using that LOGON PROC) and some that you can add later to your personal list. The latter is done with the ALTLIB command you find on the link I gave. Once that is done it is for the time you are logged on unless you issue a deact in another ALTLIB. |
|
Back to top |
|
|
AllenSieracki
New User
Joined: 10 Apr 2020 Posts: 12 Location: USA
|
|
|
|
Ok so I entered the following and it appeared to take (no error messages).
ALTLIB ACTIVATE APPLICATION(EXEC) DA('user id.REXX.EXEC')
I then browsed to a member and entered LPP next to it and the command was executed so that is great. However, I got the message:
COMMAND VP NOT FOUND
The command from the exec was:
"ISPEXEC SELECT CMD(%VP """dsn""QUEUENAME")"
VP as best I can tell is from a third party product on my system called VPSPRINT. I suspect it is a CLIST? In any case, I tried, taking off the percent sign and the VP command worked at least partially. It prompted me for a dataset name and other parameters. Normally the command doesn't ask for this if it is provided. I played around with quotation marks and eventually was prompted again for a printer name and other parameters and this time I just hit enter and the member was printed!
I suspect that I just need keep playing with the parenthesis to get the prompt to go away. Is there a way that I can show the execution of the exec as it is happening so that I can see the VP command getting executed?
I looked at other posts and tried adding the following different lines to my exec but none of them showed anything:
TRACE
/* TRACE ALL */
TRACE "O" |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1306 Location: Bamberg, Germany
|
|
|
|
As I don't know what type of command VP is, let's try another method. Trace is on..
Code: |
/* REXX */
arg dsn
trace ?i
"ISPEXEC CONTROL ERRORS RETURN"
"ISPEXEC SELECT PGM(VP) PARM("""dsn""")"
exit rc |
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1306 Location: Bamberg, Germany
|
|
|
|
Replace as follows, please:
Code: |
"ISPEXEC SELECT PGM(VP) PARM("dsn" your_queue_name_here)" |
|
|
Back to top |
|
|
AllenSieracki
New User
Joined: 10 Apr 2020 Posts: 12 Location: USA
|
|
|
|
The trace was very helpful. I tried using PGM() and PARM() as suggested but got an RC(20). I went back to the original way after seeing the trace and it turns out that I just needed a space before the queue name. It is working great now!
Really appreciate everyone's help particularly from Joerg. This seemingly simple thing is really going to help and has taught me a lot. |
|
Back to top |
|
|
|