z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Keyword statements

z/OS DFSORT Application Programming Guide
SC23-6878-00

The general format for a keyword statement is:
keyword,value remark
The general coding rules are as follows:
  • Columns 1 through 80 are scanned.
  • The keyword can start in column 1 or in any column after 1.
  • The keyword must be specified in all uppercase letters. Otherwise, it will be treated as a symbol.
  • A remark is optional, but if specified, must be separated from the value by at least one blank. A remark is printed in SYMNOUT (if specified), but otherwise not processed.
  • A semicolon (;) can be used instead of a comma (,) between the keyword and the value.
  • Continuation is not allowed. Each keyword and value must be completely specified on one line.
The specific syntax for keyword statements is:
Read syntax diagramSkip visual syntax diagram
>>-+-POSITION,q------+-----------------------------------------><
   +-POSITION,symbol-+   
   +-SKIP,n----------+   
   +-ALIGN,H---------+   
   +-ALIGN,F---------+   
   '-ALIGN,D---------'   

Keyword statements can help you map the fields in your records by letting you set a starting position, skip unused bytes and align fields on specific boundaries.
  • POSITION,q can be used to set the next position and the previous position to q. As discussed under p previously, the next position is used when an asterisk (*) is specified for p in a symbol statement, and the previous position is used when an equal sign (=) is specified for p in a symbol statement. q can be a number from 1 to 32752. When you use POSITION,q you can use either * or = interchangably for p of the next symbol.
    As an example of how POSITION,q can be used, if you specify the following SYMNAMES statements:
    POSITION,27
    Account_Balance,*,5,PD
    Account_Id,*,8,CH
    POSITION,84
    New_Balance,=,20
    SYMNOUT will show the following symbol table:
    Account_Balance,27,5,PD
    Account_Id,32,8,CH
    New_Balance,84,20
  • POSITION,symbol can be used to set the next position and the previous position to the position established for the indicated symbol. As discussed under p previously, the next position is used when an asterisk (*) is specified for p in a symbol statement, and the previous position is used when an equal sign (=) is specified for p in a symbol statement. When you use POSITION,symbol you can use either * or = interchangeably for p of the next symbol.

    symbol can be any previously defined field symbol. Thus, POSITION,symbol can be used like the Assembler ORG instruction to map different fields onto the same area.

    As an example of how POSITION,symbol can be used, if you specify the following SYMNAMES statements:
    Workarea,21,100     Use workarea for volsers
      volser1,=,6,CH
      volser2,*,6,CH
    POSITION,Workarea   Reuse workarea for status and dsname
      status,=,1,BI
      dsname,*,44,CH
    SYMNOUT will show the following symbol table:
    Workarea,21,100
    volser1,21,6,CH
    volser2,27,6,CH
    status,21,1,BI
    dsname,22,44,CH
  • SKIP,n can be used to add n bytes to the next position. As discussed under p previously, the next position is used when an asterisk (*) is specified for p in a symbol statement. n can be a number from 1 to 32752.
    As an example of how SKIP,n can be used, if you specify the following SYMNAMES statements:
    Field#1,15,6,FS
     SKIP,4   Unused bytes
    Field#2,*,5,=
     SKIP,2   Unused bytes
    Field#3,*,8,CH
    SYMNOUT will show the following symbol table:
    Field#1,15,6,FS
    Field#2,25,5,FS
    Field#3,32,8,CH
  • ALIGN,H can be used to align the next position on a halfword boundary, that is, 1, 3, 5 and so on. As discussed under p previously, the next position is used when an asterisk (*) is specified for p in a symbol statement. ALIGN,h will be treated like ALIGN,H.
    As an example of how ALIGN,H can be used, if you specify the following SYMNAMES statements:
    A1,7,3,CH
    ALIGN,H
    A2,*,2,BI
    SYMNOUT will show the following symbol table:
    A1,7,3,CH
    A2,11,2,BI
  • ALIGN,F can be used to align the next position on a fullword boundary, that is, 1, 5, 9 and so on. As discussed under p previously, the next position is used when an asterisk (*) is specified for p in a symbol statement. ALIGN,f will be treated like ALIGN,F.
    As an example of how ALIGN,F can be used, if you specify the following SYMNAMES statements:
    B1,7,3,CH
    ALIGN,f
    B2,*,4,BI
    SYMNOUT will show the following symbol table:
    B1,7,3,CH
    B2,13,4,BI
  • ALIGN,D can be used to align the next position on a doubleword boundary, that is, 1, 9, 17 and so on. As discussed under p previously, the next position is used when an asterisk (*) is specified for p in a symbol statement. ALIGN,d will be treated like ALIGN,D.
    As an example of how ALIGN,D can be used, if you specify the following SYMNAMES statements:
    C1,7,3,CH
    ALIGN,D
    C2,*,8,BI
    SYMNOUT will show the following symbol table:
    C1,7,3,CH
    C2,17,8,BI

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014