Previous Topic: DROP PLAN (DBSQLPR)Next Topic: Sample Report


Example JCL

Note: Users of z/OS can use either spaces or commas as parameter separators in the PARM= input parameter string in the JCL. In z/VSE environments, the SYSLST file must be assigned to a POWER-controlled print device. Parameter separators in the PARM= input parameter string must be spaces.

The following example shows the PARM= input parameter string specification.

         PARM='PRTWIDTH=255,INPUTWIDTH=72,PAGELEN=56,TBLHDRRPT=56'

IBM limits the PARM= input parameter string to 100 bytes. The following example depicts lines that have been spanned. Be aware the first line ends in column 71 and the second line starts in column 16.

         PARM='PRTWIDTH=255,INPUTWIDTH=72,ERRBORT=-56,OPTFILE=OP,ROWLI
               MIT=9'

z/OS JCL Sample

Note: Use the following sample as a guide to prepare your JCL. The JCL statements are for example only. The lowercase letters in a statement indicate a value that you must supply. Code all statements to your site and installation standards.

 //jobname      See the note above.
 //             CLASS=K,MSGCLASS=X,REGION=1024K
 //SQLEXEC  EXEC PGM=DBSQLPR,...see Listing Libraries for CA Datacom Products
 //*
 //       PARM='prtWidth=999,inputWidth=80'
 //*
 //SYSUDUMP DD  SYSOUT=*
 //SYSPRINT DD  SYSOUT=*
 //STDERR   DD  SYSOUT=*
 //STDOUT   DD  SYSOUT=*
 //OPTIONS  DD  *
 AUTHID=SYSUSR
 /*
 //SYSIN    DD  *
 create table testTable (colChar char(18), colInt integer);
 insert into  testTable values ('colChar row 1', 1);
 insert into  testTable values ('colChar row 2', 2);
 -- Output appears as a table unless "PRTWIDTH=" is exceeded.
 select colChar, colInt from testTable;
 rollback work;
 /*

z/VSE JCL Sample

Note: Use the following sample as a guide to prepare your JCL. The JCL statements are for example only. The lowercase letters in a statement indicate a value that you must supply. Code all statements to your site and installation standards.

* $$ JOB ...           See the note above..
* $$ LST CLASS=x
// JOB     jobname
*           CREATE OPTIONS FILE USING DITTO
// UPSI 1
// EXEC    PROC=yourproc
// ASSGN   SYSnnn,DISK,VOL=volser,SHR
// DLBL    OPTIONS,'dataset.name',0,SD
// EXTENT  SYSnnn,volser,1,0,reltrk,1
// EXEC DITTO
$$DITTO CSQ FILEOUT=OPTIONS,CISIZE=512,BLKFACTOR=1
AUTHID=SYSADM
/*
$$DITTO EOJ
/*
*           EXECUTE DBSQLPR
// EXEC DBSQLPR
   SELECT * FROM table;
/*
/&
* $$ EOJ