IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Oct 26, 2007 1:07 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Oct 26, 2007 1:11 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Oct 26, 2007 1:36 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Oct 26, 2007 2:02 pm
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: 771
Location: Germany

PostPosted: Fri Oct 26, 2007 2:12 pm
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: 8797
Location: Welsh Wales

PostPosted: Sat Oct 27, 2007 5:23 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Batch install term/printer CICS 2
No new posts Copy few lines from SYSOUT of 10 mill... All Other Mainframe Topics 5
No new posts pass data as symbolic parameter from ... CLIST & REXX 2
Search our Forums:

Back to Top