View previous topic :: View next topic
|
Author |
Message |
karupps
New User
Joined: 02 May 2007 Posts: 4 Location: London
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
karupps
New User
Joined: 02 May 2007 Posts: 4 Location: London
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
No...
I asked how the file is generated ?? |
|
Back to top |
|
|
karupps
New User
Joined: 02 May 2007 Posts: 4 Location: London
|
|
|
|
The file may be generated in another job.
Before excuting our job, the file will be ready with data.
Thanks,
Karupps |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I have had a sort of similar 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 |
|
|
|