Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Submit Print Job For PDS Member With Line Command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
AllenSieracki

New User


Joined: 10 Apr 2020
Posts: 12
Location: USA

PostPosted: Fri Apr 10, 2020 9:31 pm    Post subject: Submit Print Job For PDS Member With Line Command
Reply with quote

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
View user's profile Send private message

sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 778
Location: Maryland

PostPosted: Fri Apr 10, 2020 11:36 pm    Post subject:
Reply with quote

For those who's banned from Google:

Submitting a Batch Job from ISPF/PDF
Back to top
View user's profile Send private message
AllenSieracki

New User


Joined: 10 Apr 2020
Posts: 12
Location: USA

PostPosted: Sat Apr 11, 2020 12:18 am    Post subject: Reply to: Submit Print Job For PDS Member With Line Command
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 352
Location: Denmark

PostPosted: Sat Apr 11, 2020 1:35 am    Post subject:
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 352
Location: Denmark

PostPosted: Sat Apr 11, 2020 1:49 am    Post subject:
Reply with quote

The command is PRINTDS, not PRINT, sorry.
Back to top
View user's profile Send private message
AllenSieracki

New User


Joined: 10 Apr 2020
Posts: 12
Location: USA

PostPosted: Sat Apr 11, 2020 2:38 am    Post subject: Reply to: Submit Print Job For PDS Member With Line Command
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 250
Location: Bamberg, Germany

PostPosted: Sat Apr 11, 2020 12:23 pm    Post subject:
Reply with quote

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
View user's profile Send private message
AllenSieracki

New User


Joined: 10 Apr 2020
Posts: 12
Location: USA

PostPosted: Sat Apr 11, 2020 6:25 pm    Post subject: Reply to: Submit Print Job For PDS Member With Line Command
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 250
Location: Bamberg, Germany

PostPosted: Sat Apr 11, 2020 7:44 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2354
Location: Hampshire, UK

PostPosted: Sat Apr 11, 2020 7:45 pm    Post subject: Reply to: Submit Print Job For PDS Member With Line Command
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 250
Location: Bamberg, Germany

PostPosted: Sat Apr 11, 2020 7:53 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 352
Location: Denmark

PostPosted: Sat Apr 11, 2020 8:04 pm    Post subject:
Reply with quote

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
View user's profile Send private message
AllenSieracki

New User


Joined: 10 Apr 2020
Posts: 12
Location: USA

PostPosted: Sat Apr 11, 2020 8:40 pm    Post subject: Reply to: Submit Print Job For PDS Member With Line Command
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 250
Location: Bamberg, Germany

PostPosted: Sat Apr 11, 2020 8:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
AllenSieracki

New User


Joined: 10 Apr 2020
Posts: 12
Location: USA

PostPosted: Sat Apr 11, 2020 10:11 pm    Post subject: Reply to: Submit Print Job For PDS Member With Line Command
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 250
Location: Bamberg, Germany

PostPosted: Sat Apr 11, 2020 10:46 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 250
Location: Bamberg, Germany

PostPosted: Sat Apr 11, 2020 11:01 pm    Post subject:
Reply with quote

Replace as follows, please:
Code:
"ISPEXEC SELECT PGM(VP) PARM("dsn" your_queue_name_here)"
Back to top
View user's profile Send private message
AllenSieracki

New User


Joined: 10 Apr 2020
Posts: 12
Location: USA

PostPosted: Sat Apr 11, 2020 11:24 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Print next line strings when a condit... tgmuntor DFSORT/ICETOOL 9 Wed May 20, 2020 9:08 pm
No new posts SQL pretty print jzhardy CLIST & REXX 7 Sun May 10, 2020 4:17 am
No new posts DEBUG COMMENT command not adding to log Harold Barnes IBM Tools 0 Fri Apr 24, 2020 12:55 am
This topic is locked: you cannot edit posts or make replies. Macro REXX - ISRE741 Command not exec... sandeep prajapati CLIST & REXX 1 Fri Apr 17, 2020 12:48 am
No new posts Trying to submit COBOL PGM - JCL ERRO... sandeep prajapati JCL & VSAM 5 Tue Mar 24, 2020 11:21 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us