Difference between CMPRINT AND CMPRT01 ?



Software AG's platform-independent programming language with full support for open-source and Internet applications

Difference between CMPRINT AND CMPRT01 ?

Postby diptisaini » Fri Aug 06, 2010 1:15 pm

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 ?
diptisaini
 
Posts: 90
Joined: Sun Mar 14, 2010 5:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between CMPRINT AND CMPRT01 ?

Postby RGZbrog » Fri Aug 06, 2010 2:25 pm

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.
User avatar
RGZbrog
 
Posts: 101
Joined: Mon Nov 23, 2009 1:34 pm
Location: California, USA
Has thanked: 0 time
Been thanked: 0 time


Return to Natural

 


  • Related topics
    Replies
    Views
    Last post