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

Sample JCL which prints a dataset on the local printer....


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
csn

New User


Joined: 24 Nov 2006
Posts: 1
Location: India

PostPosted: Wed Jun 20, 2007 3:35 pm
Reply with quote

How to print a report or dataset from JCL to a local printer? What are the parameters to be passed in Output JCL Statement? Also, what are all the ways in which we can specify the DEST parameter? Thanks in advance for any help in this regard.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 20, 2007 7:11 pm
Reply with quote

Hello and welcome to the forums,

Your question will be correctly answered by your system support, scheduling, or operations people. The answers to your question are site-specific and those people will know what your options are.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 21, 2007 9:39 pm
Reply with quote

Hi,

Dick suggested the best option, still would like to provide the below JCL. JCL will initiate a printer with DEST=XXXX (see the last parameter of DD name OUTFILE ). You should be very careful about DEST parameter, a wrong parameter can initiate a production or another location printer, which may cause problems & yeah this JCL will work only if you use are using AFP for printing reports.

You need to know FORMDEF, PAGEDEF & DESTination of printer from support or operation people.

Code:
//OUTPUT1  OUTPUT FORMDEF=XXAFPF,PAGEDEF=XXAFPP,             
//          USERLIB=('HLQ.ANUJ.AFP')                     
//*                                                         
//STEP01  EXEC PGM=XXAFP                                     
//STEPLIB  DD DSN=HLQ.XXXX.PROD.PGMLIB,DISP=SHR             
//         DD DSN=XXXX.XXXX.LINKLIB,DISP=SHR
//*                                                         
//INFILE   DD DSN=HLQ.XXXXX.PRINT.FILES.DYNSUM1,       
//            DISP=SHR                                       
//*                                                         
//OUTFILE  DD SYSOUT=A,OUTPUT=*.OUTPUT1,                     
//           COPIES=1,DCB=(OPTCD=J,RECFM=VA),DEST=XXXX       
//*                   
//SYSIN DD DUMMY       
//SYSPRINT DD SYSOUT=R


If you would like to try Hard Copy print, then in ISPF go to START 3.4/Utilities/6, there provide the
data-set name to be printed
PRINT MODE: Batch,
SYSOUT class:site specific,
writer-name:Printer-Name(same as DEST in above JCL)
press enter.

Please be careful about the destination parameter in both the methods.
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top