Previous Topic: REORG Processing DetailsNext Topic: JCL Considerations


Considerations for Running REORG on VSE

Work File Creation and Deletion

REORG on VSE does not support creating and deleting work files. It will create and delete user labels, but the work files will not be created, a VTOC entry will not be created, until the file is opened for output. When REORG processing is complete, work files must be manually deleted, or overwritten to reclaim the space. The options: DELETE OLD WORKFILES, CREATE WORKFILES, and DELETEALL,only apply to user labels for the current job. Automatic deletion of work files during the CLEANUP phase will only delete user labels.

CA DYNAM/D is required to create labels

The extent of a generated label will have a relative starting track of 1 for the number of tracks based onthe primary space value. These labels require CA DYNAM/D to convert them to an actual track address at open time.

If CA DYNAM/D is not installed, labels for work files must be coded manually. The recommended procedure in this case, is to use the ESTIMATE FILE SIZES option, which does not use any work files. Code the JCL statements based on the reported file sizes; and include them in all REORG jobs.

SYSIDMS

REORG requires the RORGCTL and RORGJCL files to be defined in SYSIDMS using FILENAME= parameters:

FILENAME=RORGCTL RECFM=F BLKSIZE=8192
FILENAME=RORGJCL RECFM=F BLKSIZE=NNNN LRECL=80
DLBLMOD=ON

Where NNNN is the block size of the JCL file and must be a multiple of 80.

The SYSIDMS DLBLMOD=ON option must be specified to allow for sequential and random processing of the RORGCTL file. Either a DA or SD label m may be used for RORGCTL.

DSMODEL

The only options which apply to z/VSE are: DSN; BLKSIZE; the allocation unit value and primary value for the SPACE option; and the first volume of the VOLSER Option. The rest can be coded, but is ignored.

REORG generates labels using track sizes. If CYL is coded for a space allocation unit, the primary value is converted to tracks, but there is no cylinder alignment. If a block size is coded for an allocation unit, the coded value is used to calculate the number of tracks required.The coded value must match the BLKSIZE value, otherwise the calculated number of tracks may not be accurate.

An example of a DSMODEL follows; note that the primary space value was not coded. This allows REORG to generate the value for each file, using file size estimates. If a primary space value had been coded, this value would be used for all files regardless of the estimated size.

CREATE DSMODEL W*
 DSN 'USERID.EMPDB.WORKFILE.&DD'.
BLKSIZE 4096
 SPACE TRK
 VOLSER IDMS05
;

RORGJCL

JCL submitted by REORG is read from the RORGJCL file. This must be a sequential file built on disk and contain all the JECL and JCL statements for the submitted job. However the JECL and some JCL statements cannot be directly copied to this file using normal JCL because POWER will try to interpret these statements when the copy job is run. These statements must be "hidden" from power by changing the first characters as follows:

This is the same method used by the IESINSRT program to hide JCL, which is documented in the z/VSE Administration Guide.

The JCL will get stored on disk in the format it is coded. REORG will convert the hiding characters back to their correct values prior to submitting the job to POWER. For example the JCL to copy a job to the RORGJCL file can look like this:

// DLBL RORGJCL,'USERID.EMPDB.RORGJCL',1,SD
// EXTENT SYS020,CULLD9,,,1,5
// ASSGN SYS020,DISK,VOL=CULLD9,SHR
// EXEC IDCAMS,SIZE=386K
   REPRO INFILE(SYSIPT) -
        OUTFILE(RORGJCL ENV( BLKSZ(4080) RECFM(FB) RECSZ(80) ) )
$ $$ JOB JNM=RORGJOB,CLASS=B,DISP=D
$ $$ LST CLASS=R,DEST=(,USERID),JSEP=0
$ $$ PUN CLASS=R,DEST=(,USERID)
#/ JOB RORGJOB
* JCL THAT REORG SUBMITS
#/ DLBL SYSIDMS,'#SYSIPT'
#/ EXEC IDMSBCF,SIZE=256K
ECHO=ON  JOURNAL=OFF  DLBLMOD=ON
DMCL=IDMSDMCL DBNAME=EMPDEMO
FILENAME=RORGCTL RECFM=F  BLKSIZE=8192
#*
REORG;
#*
#&
$ $$ EOJ
/*      EOF for REPRO

The statements starting with $ $$ JOB and ending with $ $$ EOJ are copied to RORGJCL and are submitted by REORG.