Sample DSN1PRNT control statements

Use the sample control statements as models for developing your own DSN1PRNT control statements.

Example 1: Printing a data set and formatting the output

The following example specifies that the DSN1PRNT utility is to print the data set that is identified by the SYSUT1 DD statement and the output is to be formatted. This data set is to be printed on the data set that is identified by the SYSPRINT DD statement. The fifth-level qualifier in the data set name can be either I0001 or J0001. This example uses I0001.

//jobname JOB acct info
//RUNPRNT EXEC PGM=DSN1PRNT,PARM='PRINT,FORMAT'
//STEPLIB DD DSN=prefix.SDSNLOAD
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSN=DSNCAT.DSNDBC.DSNDB01.SYSUTILX.I0001.A001,DISP=SHR

Example 2: Printing a nonpartitioning index with a 64-MB piece size

The following example specifies that DSN1PRNT is to print the first 16 pages of the 61st piece of an nonpartitioned index with a piece size of 64 MB. The pages that are to be printed are identified by the PRINT option. These page values are determined as follows: A data set of size 64 MB contains X'4000' 4-KB pages. Decimal 61 is X'3D'. The page number of the first page of the 61st piece is 4000*(3D-1) = 4000*3C = F0000. To print the last 16 pages of the 61st piece, specify PARM=(PRINT(F3FF0,F3FFF), ...).

The fifth-level qualifier in the data set name can be either I0001 or J0001. This example uses I0001.

//PRINT2 EXEC PGM=DSN1PRNT,
//            PARM=(PRINT(F0000,F000F),FORMAT,PIECESIZ(64M))
//SYSUDUMP DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
//SYSUT1   DD DISP=OLD,DSN=DSNCAT.DSNDBD.MMRDB.NPI1.I0001.A061

Example 3: Printing a single page of an image copy

The following example specifies that DSN1PRNT is to print one page of an image copy. The image copy is identified by the SYSUT1 DD statement. The PRINT option specifies that the only page to be printed is X'1'.

//STEP2    EXEC PGM=DSN1PRNT,                                             
//         PARM='PRINT(1),FORMAT,INLCOPY'                                 
//STEPLIB  DD DSN=DB2A.SDSNLOAD,DISP=SHR                                   
//SYSUDUMP DD SYSOUT=A                                                    
//SYSPRINT DD SYSOUT=A                                                    
//SYSUT1   DD DSN=HUHYU205.L1.STEP1.DD2,DISP=SHR                          

Example 4: Printing a partitioned data set

The following example specifies that DSN1PRNT is to print the data set that is identified by the SYSUT1 DD statement. Because this data set is a table space that was defined with the LARGE option, the DSSIZE(4G) option is specified in the parameter list for DSN1PRNT. You could specify the LARGE option in this list instead, but specifying DSSIZE(4G) is recommended. This input table space has 260 partitions, as indicated by the NUMPARTS option.

//RUNPRNT1 EXEC PGM=DSN1PRNT,                          
//    PARM='DSSIZE(4G),PRINT,NUMPARTS(260),FORMAT'    
//STEPLIB  DD DSN=DB2A.SDSNLOAD,DISP=SHR            
//SYSPRINT DD SYSOUT=A                           
//SYSUT1   DD DSN=DSNCAT.DSNDBC.DBOM0301.TPOM0301.I0001.A259,DISP=SHR 
/*                                                                             

Example 5: Printing a page range of a specific partition

It is difficult to determine page numbers for a specific partition of a partitioned table space.

This example describes a simple way of using DSN1PRNT without needing to calculate page numbers.

  1. Run DSN1PRNT on the partition you want to process without specifying a PRINT range. Set the FORMAT option to NODATPGS. Data pages are not printed reducing the use of spool space.
    //    EXEC  PGM=DSN1PRNT,
    //    PARM='FORMAT,NODATPGS,NUMPARTS(8)'
    //SYSUT1   DD DSN=DSNT6USR.DSNDBC.V9DS306.XV9D0000.I0001.A008,DISP=SHR

    The printout includes page numbers. Use these page numbers to setup another DSN1PRNT job using the appropriate page numbers.

  2. Run DSN1PRNT on partition 8 specifying your PRINT range
    //    EXEC  PGM=DSN1PRNT,
    //    PARM='PRINT(xx000000,xx000020),FORMAT,NUMPARTS(8)'
    //SYSUT1   DD DSN=DSNT6USR.DSNDBC.V9DS306.XV9D0000.I0001.A008,DISP=SHR

    The page range must be specified in hexadecimal format.

Example 6: Specifying Unicode output for DSN1PRNT

When you specify the UNICODE option for DSN1PRNT, you are not going to see non-Latin Unicode characters, such as Japanese characters, in your output. When you specify the UNICODE option, DSN1PRNT takes the hexadecimal data and formats it as ASCII instead of the default EBCDIC.

A problem might arise when the data that you want DSN1PRNT to handle is in UTF-16. In the case of UTF-16 data, DSN1PRNT takes only the second byte of the data and formats that part of the data as ASCII. Thus, the output might not be correct. For example, the UTF-16 hexadecimal values X'0030' and X'1130' are both output as 0, because the first byte of each ("00" and "11" respectively) is ignored. The remaining part ("30") is interpreted as an ASCII 0. In UTF-16, X'0030' is the hexadecimal value for 0, but X'1130' is the hexadecimal value for a Hangul character.

In the following DSN1PRNT example, notice the three bold hexadecimal values: X'0041', X'0141', and X'0241'. The output for all three of these values is A.A.A, even though they each correspond to different characters in UTF-16. (X'0041' is A, X'0141' is Ł, and X'0241' is the Latin capital character for glottal stop.)

//STEP1    EXEC PGM=DSN1PRNT,                                     
//         PARM='FORMAT,PRINT(002),UNICODE'                      
//STEPLIB  DD DSN=DB2A.DSNLOAD,DISP=SHR                           
//SYSUDUMP DD SYSOUT=A                                            
//SYSPRINT DD SYSOUT=A                                            
//SYSOUT   DD SYSOUT=A                                            
//SYSABEND DD SYSOUT=A                                            
//SYSUT1   DD DSN=TESTCAT.DSNDBC.DBED2101.TPED2101.I0001.A001,DISP=SHR 
/*      
DSN1999I START OF DSN1PRNT FOR JOB DSN1PRNT RUNPRNT9
DSN1989I DSN1PRNT IS PROCESSED WITH THE FOLLOWING OPTIONS: 
4K/NO IMAGECOPY/NUMPARTS =   0/   FORMAT/NO EXPAND/   PRINT/NO VALUE/     /   / 
DSSIZE=   /PIECESIZ=    /UNICODE/ 
DSN1998I INPUT  DSNAME = TESTCAT.DSNDBC.DBED2101.TPED2101.I0001.A001 , VSAM  

PAGE: # 00000002 -------------------------------------------------------------------------------- 
DATA PAGE:  PGCOMB='10'X  PGLOGRBA='0000758C9455'X  PGNUM='00000002'X  PGFLAGS='00'X  PGFREE=4041  
PGFREE='0FC9'X  PGFREEP=51  PGFREEP='0033'X  PGHOLE1='0000'X  PGMAXID='01'X  PGNANCH=1 
PGTAIL:  PGIDFREE='00'X  PGEND='N'  

ID-MAP FOLLOWS:  
01  0014 
RECORD:  XOFFSET='0014'X  PGSFLAGS='02'X  PGSLTH=31  PGSLTH='001F'X  PGSOBD='0003'X  PGSBID='01'X 
80000001 00004101 41024100 20002000 20002000 20002000 20                  ......A.A.A. . . . . . .  

DSN1994I DSN1PRNT COMPLETED SUCCESSFULLY,  00000001 PAGES PROCESSED            
Related information: