Create Format Selector job

Complete the values listed in the Secondary Options window for the Create Format Selector job as shown below:

Create Format Selector job

Format Selector Name
The name of the format selector. It is a character field with a maximum length of 8 characters.
Position
The position of the record format. It is a 5-digit number.
Length
The length of the record format. It is a 3-digit number.

To better manage file names with format selector, KURFMT is available. Variables KURFMT-FILTYPE, KURFMT-FILNAME and KURFMT-FILVER contain characteristics of the file when using Format Selector.

The following is an example of a Format Selector program using KURFMT:

…
 COPY KURFMTW.
      *****************************************************************
       LINKAGE SECTION.
      *****************************************************************
      * INPUT
M50373*01  LK-RECORD                  PIC  X(16000).
M50373 01  LK-RECORD                  PIC  X(32760).
      * OUTPUT
       01  LK-FORMAT                  PIC  X(0010).
      *****************************************************************
       PROCEDURE DIVISION           USING LK-RECORD
                                          LK-FORMAT.
      *****************************************************************
      *****************************************************************
      *
          SET     KURFMT-OP-READ  TO TRUE.
          CALL "KURFMT" USING KURFMT-AREA.
          DISPLAY KURFMT-FILNAME