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
 

 

How to pass value(printer name) to SYSOUT=&&??

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
karupps

New User


Joined: 02 May 2007
Posts: 4
Location: London

PostPosted: Fri Oct 26, 2007 12:49 pm    Post subject: How to pass value(printer name) to SYSOUT=&&??
Reply with quote

Hi,

Currently I am sending my output (from COBOL / PL1) to known printer say
...
...
...
//PRINT1 DD SYSOUT=(Q,PRT1),
// DCB=XXXX
...
...
...
But now the printer name will vary and will be taken from another flat file.

I need to take the printer name from the flat file and put in the SYSOUT in the same JCL
...
...
...
//PRINT1 DD SYSOUT=(Q,to be taken from the flat file),
// DCB=XXXX
//FILE1 DD DSN=flat file
...
...
...
Please guide me to solve the above problem.

Please let me know if you need more information

Thanks,
Karupps
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Oct 26, 2007 1:07 pm    Post subject: Reply to: How to pass value(printer name) to SYSOUT=&&am
Reply with quote

is this the first request of this kind Your site ?

if not ask on how it is done, and behave accordingly,

otherwise it is something that should be discusses with
application and operations support..

anyway the task is not simple....

how do You choose the printer from the list
the flat file is irrelevant, it' s only use is to check for a non existent printer

optiion 1) generate dynamically the JCL
option 2) verify if it can be done thru Your scheduling pakage

but the main question is :

How do You choose the printer

if You answer we might help You[/b]
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Oct 26, 2007 1:11 pm    Post subject: Reply to: How to pass value(printer name) to SYSOUT=&&am
Reply with quote

I had a brain check...

You mean that somebody creates a file with a single record containing
the printer name, don' t You

How is this file created,
maybe the printer is chosen by the end user thru an ISPF dialog ??

please clarify
Back to top
View user's profile Send private message
karupps

New User


Joined: 02 May 2007
Posts: 4
Location: London

PostPosted: Fri Oct 26, 2007 1:21 pm    Post subject:
Reply with quote

Thanks a lot for your kind reply!

I know the position in the flat file where the printer name exists in a single record flat file.

For example

The FILE1

//FILE1 DD DSN=flat file

will contains the record like this

XXXXXXXXYYYYPRT1(printer name)ZZZZZZ

The PRT1 may be PRT2,PRT3,etc.

Based on the value from the printer name from the flat file, my out put should go to that printer.

I hope I have stated clealry.

Thanks in advance
Karupps
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Oct 26, 2007 1:36 pm    Post subject: Reply to: How to pass value(printer name) to SYSOUT=&&am
Reply with quote

No...
I asked how the file is generated ??
Back to top
View user's profile Send private message
karupps

New User


Joined: 02 May 2007
Posts: 4
Location: London

PostPosted: Fri Oct 26, 2007 1:46 pm    Post subject:
Reply with quote

The file may be generated in another job.
Before excuting our job, the file will be ready with data.

Thanks,
Karupps
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Oct 26, 2007 2:02 pm    Post subject: Reply to: How to pass value(printer name) to SYSOUT=&&am
Reply with quote

Are You sure You are not mixing JCL concepts
I overlooked Your quoted jcl

from Your post
Quote:
Currently I am sending my output (from COBOL / PL1) to known printer say
//PRINT1 DD SYSOUT=(Q,PRT1),
// DCB=XXXX
But now the printer name will vary and will be taken from another flat file.


usually the printer name is specified with the dest parameter

from the jcl reference
Quote:

writer-name
Identifies the member name (1 to 8 alphanumeric characters) of an installation-written program.


An external writer is a started task used to process output. Because the external writer is a started task, it has a userid associated with it. Process output with an external writer by naming the writer on the DD statement that defines the output:



//MYOUTPUT DD SYSOUT=(A,XTWTR)



Anyway whatever parameter You want to change in Your JCL
the only way to do it is by writing and submitting a jcl modified
whit the needed parameters

I was asking about ISPF because in that environment is very easy to
customize JCL
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Fri Oct 26, 2007 2:12 pm    Post subject:
Reply with quote

Hi !

The first solution, i think of, is modifying the JobFileControlBlock.

The Job Management routines construct a JFCB for each ddname specified in a job step. This could be read and modified by Assembler instructions.
So you need to call a Assembler Sub-Programm for doing that.

Well, to be perfectly honest, it's a tricky and bad behavior for todays time.

Another thing is, to let this be done by the guys, who are responsible for JCL and Production-Sheduling. They could solve this by Jcl-procs and via
variables of the ShedulingSystem, Ca or OPC/ESA. Ask them !!!

Regards & nice Weekend, UmeySan
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sat Oct 27, 2007 5:23 pm    Post subject:
Reply with quote

I have had a sort of similar icon_rolleyes.gif request a good many years ago, and knocked up a quick REXX to do it.

Basically you read the file with the printer destination and other associated info, build a SYSUT2 statement from the given info, and invoke IEBGENER to perform the print.

Maybe the requirement isn't exactly the same, but this might help you get your solution.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm
No new posts How to map virtual printer in JCL, to... user_22 JCL & VSAM 6 Fri Apr 15, 2016 10:04 pm
No new posts how to pass data from a rexx program ... Akshay Yadav TSO/ISPF 8 Mon Feb 15, 2016 12:05 pm


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