Features Added in FOCUS 7.6.11

In this section:

Starting in FOCUS 7.6.11, you can specify a minimum width for format WP output files.


Top of page

x
Setting the Width of Format WP Output Files

How to:

The HOLD or SAVE FORMAT WP command produces a variable length output file in which the report width is based on the fields propagated to the output file in the request.

If you need the report width to remain fixed across releases for later processing of the output file, you can set the width you need using the SET WPMINWIDTH command. This parameter specifies the minimum width of the output file. It will be automatically increased if the width you set cannot accommodate the fields propagated to the output file in the request. On z/OS, The LRECL of the output file will be four bytes more than the report width because the file is variable length and needs an additional four bytes to hold the actual length of each record instance. In other operating environments, the length of the record is the value of WPMIDWIDTH.



x
Syntax: How to Specify the Minimum Width of a FORMAT WP Output File
SET WPMINWIDTH = {0|nnn}
ON TABLE SET WPMINWIDTH {0|nnn}

where:

nnn

Is the minimum width of the output file. On z/OS, the LRECL will automatically be nnn + 4 bytes. If you specify zero (0) for nnn, the width will be calculated automatically based on the report request. If the width you specify cannot accommodate the fields propagated to the output file, it will be automatically increased enough to accommodate them.



Example: Setting the Width of a HOLD FORMAT WP Report

The following report creates a FORMAT WP output file without setting WPMINWIDTH:

TABLE FILE EMPLOYEE                                      
SUM LAST_NAME FIRST_NAME DEPARTMENT CURR_JOBCODE CURR_SAL
BY LAST_NAME NOPRINT BY FIRST_NAME NOPRINT               
  ON TABLE SAVE AS WP1  FORMAT WP                        
END  

Running the request on z/OS and issuing the ? TSO DDNAME WP1 command produces the following output, which shows the LRECL for the WP file to be 76:

? tso ddname wp1
DDNAME      =  WP1                                    
DSNAME      =  SYS09166.T133141.RA000.PMSSAE.R0170750 
DISP        =  NEW                                    
DEVICE      =  DISK                                   
VOLSER      =  MWRKE4                                 
DSORG       =  PS                                     
RECFM       =  VB                                     
SECONDARY   =        10                               
ALLOCATION  =  CYLINDER                               
BLKSIZE     =     27998                               
LRECL       =        76                               
TRKTOT      =        75                               
EXTENTSUSED =         1                               
BLKSPERTRK  =         2                               
TRKSPERCYL  =        15                               
CYLSPERDISK =      3340                               
BLKSWRITTEN =         1                               

The following version of the request sets the value of WPMIDWIDTH to 120:

TABLE FILE EMPLOYEE                                      
SUM LAST_NAME FIRST_NAME DEPARTMENT CURR_JOBCODE CURR_SAL
BY LAST_NAME NOPRINT BY FIRST_NAME NOPRINT               
  ON TABLE SET WPMINWIDTH 120                            
  ON TABLE HOLD AS WP1 FORMAT WP                         
END 

Issuing the ? TSO DDNAME WP1 command now shows that the LRECL is 124, four more than the specified width:

? tso ddname wp1
DDNAME      =  WP1                                   
DSNAME      =  SYS09166.T133141.RA000.PMSSAE.R0170750
DISP        =  NEW                                   
DEVICE      =  DISK                                  
VOLSER      =  MWRKE4                                
DSORG       =  PS                                    
RECFM       =  VB                                    
SECONDARY   =        10                              
ALLOCATION  =  CYLINDER                              
BLKSIZE     =     27998                              
LRECL       =       124                              
TRKTOT      =        75                              
EXTENTSUSED =         1                              
BLKSPERTRK  =         2                              
TRKSPERCYL  =        15                              
CYLSPERDISK =      3340                              
BLKSWRITTEN =         1                              

The following version of the request sets WPMINWIDTH to 64, a width that is too small to accommodate the fields propagated to the output file:

TABLE FILE EMPLOYEE                                      
SUM LAST_NAME FIRST_NAME DEPARTMENT CURR_JOBCODE CURR_SAL
BY LAST_NAME NOPRINT BY FIRST_NAME NOPRINT               
  ON TABLE SET WPMINWIDTH 64                            
  ON TABLE HOLD AS WP1 FORMAT WP                         
END 

Issuing the ? TSO DDNAME WP1 command shows that the LRECL is 76, the record length calculated to fit all of the fields in the output file:

? tso ddname wp1
DDNAME      =  WP1                                    
DSNAME      =  SYS09166.T133141.RA000.PMSSAE.R0170750 
DISP        =  NEW                                    
DEVICE      =  DISK                                   
VOLSER      =  MWRKE4                                 
DSORG       =  PS                                     
RECFM       =  VB                                     
SECONDARY   =        10                               
ALLOCATION  =  CYLINDER                               
BLKSIZE     =     27998                               
LRECL       =        76                               
TRKTOT      =        75                               
EXTENTSUSED =         1                               
BLKSPERTRK  =         2                               
TRKSPERCYL  =        15                               
CYLSPERDISK =      3340                               
BLKSWRITTEN =         1                               

Information Builders