Page 1 of 1

Difference between CMPRINT AND CMPRT01 ?

PostPosted: Fri Aug 06, 2010 1:15 pm
by diptisaini
Hi,

I just need to know what is the difference between CMPRINT and CMPRT01 ?
//CMPRINT DD SYSOUT=*
//CMPRT01 DD DSN=WGS0227.SDLMCPY.RP2681,DISP=(OLD,CATLG,CATLG),
// SPACE=(CYL,(01,05),RLSE),
// DCB=(RECFM=FBA,LRECL=133,BLKSIZE=1330)

Is it possible to give //CMPRINT DD DSN=WGS0227.SDLMCPY.RP2681,DISP=(OLD,CATLG,CATLG),
// SPACE=(CYL,(01,05),RLSE),
// DCB=(RECFM=FBA,LRECL=133,BLKSIZE=1330)

then on that case what changes need to be done on natural program ?

Re: Difference between CMPRINT AND CMPRT01 ?

PostPosted: Fri Aug 06, 2010 2:25 pm
by RGZbrog
I'm not sure whether you're asking a Natural question or a JCL question.

Natural makes 32 logical reports available to your programs. They are numbered 0 through 31. Reports are produced by a combination of statements, including DISPLAY, PRINT, and WRITE. You send print lines to printer 1 - 31 by specifying the printer number in parentheses, as in

WRITE (3) 'Caption:' #FIELD-NAME

To send print lines to printer 0, you can omit the printer number:

WRITE (0) 'Caption:' #FIELD-NAME
WRITE     'Caption:' #FIELD-NAME


At execution time, JCL is used to attach a physical printer to each logical printer. Natural associates printers 1 - 31 with DDNAMEs CMPRT01 - CMPRT31, respectively. Printer 0 is associated with DDNAME CMPRINT.

Your JCL sample demonstrates that print files are not restricted to physical printers, but may be routed to datasets for subsequent processing. This routing requires no changes to your program logic.