OUTFIL

The following parameters of this SYNCSORT control statement are supported in MFSORT and MFJSORT. To enable this support, set the MFJSENGINE environment variable.

Note: SYNCSORT emulation allows you to omit the equals sign (=) between a keyword and its bracketed parameters; for example, OUTREC(05:5,10).
           +----------------------------,-----------------------------------+
           |                                                                |
           |             +---,----+                                         |
           V             V        |                                         |
>--OUTFIL--.--.--FNAMES=-.-ddname-.---------------------------------------.-.----------<<
              |                                                           |
              |         +---,-----+                                       |
              |         V         |                                       |
              +--FILES=-.-.-d---.-.---------------------------------------+
              |           +-dd--+                                         |
              |           +-OUT-+                                         |
              |                                                           |                                                          
              +--STARTREC=-n----------------------------------------------+
              |                                                           |
              +-ENDREC=-n-------------------------------------------------+
              |                                                           |
              |           +------,---------+                              |
              |           V                |                              | 
              +--OUTREC=-(.-item-statement-.)-.----------.-.------------.-+
              |                               +-,VTOF----+ +-VFILL=byte-+ |         
              |                               +-,CONVERT-+                |
              |            +-------,--------+                             |
              |            V                |                             |
              +--OVERLAY=-(.-item-statement-.)----------------------------+
              |                                                           |
              |                                                           |
              |                                                           |
              +-.-INCLUDE=-.-(-logical-expression-)-.---.-----------------+
              | |          +-ALL--------------------+   |                 |               
              | |          +-NONE-------------------+   |                 |
              | |                                       |                 |
              | |                                       |                 | 
              + +-OMIT=-.-(logical-expression-)-.-------+                 |
              |         +-ALL-------------------+                         |
              |         +-NONE------------------+                         |
              |                                                           |
              +--SAVE-----------------------------------------------------+
              |                                                           |
              +--FTOV-----------------------------------------------------+
              |                                                           |
              +--VLTRIM=byte----------------------------------------------+
              |                                                           |
              +--SPLIT----------------------------------------------------+
              |                                                           |
              +--NULLOFL=-.-RC0--.----------------------------------------+
              |           +-RC4--+                                        |
              |           +-RC16-+                                        |
              |                                                           |
              +--LINES=n--------------------------------------------------+
              |                                                           |
              |           +--------,--------+                             |
              |           V                 |                             |
              +--HEADERn=-.-(-header-item-)-.-----------------------------+
              |                                                           |
              |            +-------,----------+                           |
              |            V                  |                           |
              +--TRAILERn=-.-(-trailer-item-)-.---------------------------+
              |                                                           |
              |            +-------,----------+                           |
              |            V                  |                           |
              +--SECTIONS=-.-(-section-item-)-.---------------------------|
              |                                                           |
              +--NODETAIL-------------------------------------------------|
              |                                                           |
              +--REMOVECC-------------------------------------------------|
              |                                                           |
              +--CONVERT--------------------------------------------------|
              |                                                           |
              +--BLKCCH1--------------------------------------------------|
              |                                                           |                      
              +--BLKCCH2--------------------------------------------------+
Note: The maximum number of OUTFILs is 2048.

In order for BLKCCH1 and BLKCCH2 to take effect in MFSORT, they need to be used with MAINFRAMEPRINT in the extfh.cfg file and with SORTTYPE=2 in the environment.

The following options for the item-statement field are supported:

                     +-------------,-----------------------------------------+
                     V                                                       |
>--item-statement=--(.--.----.-.-s-----------------------------------------.-.-)--.---------.--<<
                        +-c:-+ |                                           |      +-convert-+
                               +-p-----------------------------------------+
                               |                                           |       
                               +-p,m.----.---------------------------------+     
                               |    +-,a-+                                 |
                               |                                           |      
                               +-p,m,format.-,edit-.-----------------------+     
                               |           +-,to---+                       |
                               |                                           |     
                               +-p,HEX-------------------------------------+  
                               |                                           |
                               +-p,m,HEX-----------------------------------+      
                               |                                           |
                               +-p,m,TRAN=LTOU-----------------------------+
                               |                                           |  
                               +-p,m,TRAN=UTOL-----------------------------+
                               |                                           |  
                               +-p,m,TRAN=ALTSEQ---------------------------+
                               |                                           |  
                               +-p,m,Y2x(c)--------------------------------+
                               |                                           |  
                               +-p,m,Y2xP----------------------------------+
                               |                                           |  
                               +-p,m,CHANGE=(v,(find-set)+,[NOMATCH=(set)]-+
                               |                                           |
                               +-seqnum------------------------------------+  
 
Note: For options p,m,Y2x(c), the (c) is only parsed and ignored in this COBOL system
Restriction: If the SORT command also includes the SORT-EBCDIC parameter, characters in the CHANGE and NOMATCH options must be specified in hexadecimal format.

The following field values are supported, where applicable:

Field Values
a (alignment) D (doubleword aligned), F (fullword aligned), H (halfword aligned).
s (separation) ADD, DATE, &DATE, DATE=(abcd), &DATE=(abcd), DATE1, &DATE1, DATE1P, &DATE1P, DATE2, &DATE2, DATE2P &DATE2P, DATE3, &DATE3, DATE3P, &DATE3P, DATEn, &DATEn, DATEn+r, &DATEn+r, DATEn-r, &DATEn-r, DATEn(c), &DATEn(c), DATEn(c)+r, &DATEn(c)+r, DATEn(c)-r, &DATEn(c)-r, DATEnP, DATEnP+r, &DATEnP+r, DATEnP-r, &DATEnP-r, DATENS, &DATENS, DATENS=(abc), &DATENS=(abc), DIV, LITERALS, MUL, SEPERATOR CHARS, SEQNUM, SUB.

The following options for the logical-expression field are supported:

>--relational-condition1--.----------------------------------------.---<<
                          | +-------------------.---------------+  |
                          | V                                   |  |
                          +-.-,-.-AND-.--,relational-condition2-.--.
                                +-OR--+

The following options for the relational-expression field are supported:

>--.-(p1,m1.---------.,binary-operator,-.-p2,m2,format-.)----------------.-->
   |       +-,format-+                  +-constant-----+                 |
   |                                                                     |
   +-(p1,m1,.-----.-.-EQ-.-,-.-constant-.-)------------------------------+
   |        +-SS,-+ +-NE-+   +-NUM------+                                |
   |                                                                     |
   +-(p1,m1,format,-.-EQ-.-,-NUM)----------------------------------------|
   |                +-NE-+                                               |
   |                                                                     |
   +-(p1,m1,-.----.-,-bit-operator,-mask)--------------------------------|
   |         +-BI-+                                                      |
   |                                                                     |
   +-(p1,m1,-.-------------.-,-binary-operator,-.-p2,m2,-.------------.)-+
             +-date-format-+                    |        +date-format-+ 
                                                +-constant------------+

The following field formats are supported, where applicable:

Field Supported formats
Binary-operator EQ, GE, GT, LE, LT, NE.
Bit-operator ALL, BM, BNM, BNO, BNZ, BO, BZ, NONE, NOTALL, NOTNONE, NOTSOME, SOME.
Date-format Y2B, Y2C, Y2D, Y2P, Y2S, Y2T, Y2U, Y2V, Y2W, Y2X, Y2Y, Y2Z, Y2TP, Y2UP, Y2VP, Y2WP, Y2XP, Y2YP.
Format AQ, BI, CH, CLO, CSF, CSL, CST, CTO, FI, FL, FS, LS, OL, OT, PD, PD0, SB, SS, TS, ZD.

The following options for the header item are supported:

              +-------------,--------------------+
              V                                  |
>--HEADERn=--(.--.----.-.-r------------------.-)-.--<<
                 +-c:-+ +-.-DATE----------.--+     
                        | +-&DATE---------+  |   
                        | +-DATE=(abcd)---+  |    
                        | +-&DATE=(abcd)--+  |   
                        | +-DATENS=(abc)--+  |   
                        | +-&DATENS=(abc)-+  |
                        |                    |   
                        +-.-TIME--.----------+     
                        | +-&TIME-+          |
                        |                    |
                        +-.-PAGE--.----------+     
                          +-&PAGE-+  

The following options for a trailer item are supported:

               +-------------,----------------------------------+
               V                                                |
>--TRAILERn=--(.--.----.-.-r--------------------------------.-)-.--<<
                  +-c:-+ +-.-DATE----------.----------------+     
                         | +-&DATE---------+                |   
                         | +-DATE=(abcd)---+                |    
                         | +-&DATE=(abcd)--+                |   
                         | +-DATENS=(abc)--+                |    
                         | +-&DATENS=(abc)-+                |
                         |                                  |   
                         +-.-TIME--.------------------------+     
                         | +-&TIME-+                        |
                         |                                  |
                         +-.-PAGE--.------------------------+     
                         | +-&PAGE-+                        |
                         |                                  |
                         +-.-COUNT-------.------------------|
                         | +-COUNT=edit--+                  |
                         |                                  |
                         +-.-SUBCOUNT-----------.-----------|
                         | +-SUBCOUNT15---------+           |
                         | +-SUBCOUNT=(.-edit-.)+           |
                         |             +-to---+             |
                         |                                  |
                         +-.-TOTAL-.=-(p,m,f.------.)-------+
                         | +-TOT---+        +-,to--+        |
                         |                                  |
                         +-MIN=(p,m,f.------.)--------------+
                         |           +-,to--+               |
                         |                                  |
                         +-MAX=(p,m,f.------.)--------------+
                         |           +-,to--+               |
                         |                                  |
                         +-AVG=(p,m,f.------.)--------------+
                         |           +-,to--+               |
                         |                                  |
                         +--.-SUB------.=-(p,m,f.-------.)--+
                         |  +-SUBTOT---+        +-,edit-+   |
                         |  +-SUBTOTAL-+        +-,to---+   |
                         |                                  |
                         +--SUBMIN=-(p,m,f.-------.)--------+
                         |                +-,edit-+         |
                         |                +-,to---+         |
                         |                                  |
                         +--SUBMAX=-(p,m,f.-------.)--------+
                         |                +-,edit-+         |
                         |                +-,to---+         |
                         |                                  |
                         +--SUBAVG=-(p,m,f.-------.)--------+
                         |                +-,edit-+         |
                         |                +-,to---+         |
                         +----------------------------------+
Note: See the Limitations section for the COUNT and SUBCOUNT values, and the TOTAL, MIN, MAX, and AVG fields.

The following options for a sections item are supported:

              +------------------------------,--------------------------+
              |     +------------------------,------------------------+ |
              V     V                                                 | |
>--SECTIONS=-(.-p,m-.--.--------------------------------------------.-.-.)----<<
                       +-SKIP=.-P--.--------------------------------+
                       |      +-L--+                                |
                       |      +-nL-+                                |
                       |          +-----,-------+                   |
                       |          V             |                   |      
                       +-HEADER3=(.-header-item-.)--.------------.--+
                       |                            +-,-PAGEHEAD-+  |
                       |           +-----,-------+                  |
                       |           V             |                  |      
                       +-TRAILER3=(.-header-item-.)-----------------+

Limitations:

  • The maximum length of COUNT and SUBCOUNT values is 9 digits.
  • The maximum length of the TOTAL fields:
    TOTAL field formats MFJSORT SYNCSORT
    Length (m) Digits (d) Length (m) Digits (d)
    ZD 1-15 *Maximum 18. 1-15 15
    ZD 16-31 16-31 31
    PD 1-8 1-8 15
    PD 9-16 9-16 31
    BI 1-4 1-4 10
    BI 5-8 5-8 20
    FI 1-4 1-4 10
    FI 5-8 5-8 20
    FL 4 or 8 4 or 8 20
    CSF, FS 1-15 1-15 15
    CSF, FS 16-32 16-32 31

    * MFJSORT will display the total to the same amount of digits as specified in the length.

  • The TO parameter for TOTAL, MIN, MAX, and AVG is only applicable for TRAILER3.