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


INREC and OUTREC

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

PARSE operand: You can use symbols where you can use parsed fields (%nn) and constants (C'xx...x' and X'yy...yy').

FIELDS, BUILD, OVERLAY, FINDREP, IFTHEN BUILD, IFTHEN OVERLAY, IFTHEN FINDREP and IFTHEN PUSH operands: You can use symbols where you can use output columns (c:), fields (p,m,f and p,m and p), parsed fields (%nn), non-repeated constants (C'xx...x' and X'yy...yy', but not nC'xx...x' or nX'yy...yy'), and decimal constants (+n and -n, but not n). You cannot use symbols for edit patterns ('pattern').

In the JFY and SQZ suboperands, you can use symbols where you can use constants (C'xx...x' and X'yy...yy').

In the CHANGE and NOMATCH suboperands, you can use symbols where you can use a number (n), fields (q,n), parsed fields (%nn), and constants (C'xx...x', X'yy...yy' and B'bbbbbbbb').

In the RESTART suboperand for SEQNUM, you can use a symbol where you can use a number (n), a field (p,m) or a parsed field (%nn).

A symbol for p or p,m or p,m,f or p,m,Y2x or p,m,Y2xP or p,m,Y4x results in substitution of p: for symbol: (output column).

A symbol for p,m,f results in substitution of p,m,f if (symbol),fo or symbol,TO=fo or symbol,ZDF or symbol,ZDC or symbol,PDC or symbol,PDF is specified, but results in substitution of p,m if symbol,fo is specified (when fo is not ZDF, ZDC, PDC, or PDF) because fo cannot be distinguished from f (except for ZDF, ZDC, PDC, or PDF). For example, if SYM1 is defined as 5,4,ZD, (SYM1),PD is transformed to (5,4,ZD),PD and SYM1,TO=PD is transformed to 5,4,ZD,TO=PD, whereas SYM1,PD is transformed to 5,4,PD. Thus, you should always use (symbol),fo or symbol,TO=fo rather than symbol,fo

A symbol for p,m,f results in substitution of p,m unless symbol,edit or symbol,to or (symbol) is specified or the symbol is part of an arithmetic expression. For example, if SYM1 is defined as 5,4,ZD, SYM1,X is transformed to 5,4,X, whereas SYM1,M12 is transformed to 5,4,ZD,M12 and SYM1,ADD,+1 is transformed to 5,4,ZD,ADD,+1.

A symbol for p,m,Y2x results in substitution of p,m,Y2x if symbol,TO=fo or symbol,todate or symbol,dateop or symbol,ZDF or symbol,ZDC or symbol,PDC or symbol,PDF is specified, but results in substitution of p,m if symbol,fo is specified (when fo is not ZDF, ZDC, PDC, or PDF) because fo cannot be distinguished from f (except for ZDF, ZDC, PDC, or PDF). For example, if SYM1 is defined as 5,4,Y2T, SYM1,TO=PD is transformed to 5,4,Y2T,TO=PD, whereas SYM1,PD is transformed to 5,4,PD. Thus, you should always use symbol,TO=fo rather than symbol,fo when dealing with symbols for p,m,Y2x fields

A symbol for p,m,Y2x results in substitution of p,m,Y2x unless symbol,f or symbol,HEX is specified. A symbol for p,m,Y2xP results in substitution of p,m,Y2xP unless symbol,f or symbol,HEX is specified.

A symbol for p,m,Y4x results in substitution of p,m,Y4x if symbol,TO=fo or symbol,todate or symbol,dateop or symbol,ZDF or symbol,ZDC or symbol,PDC or symbol,PDF is specified, but results in substitution of p,m if symbol,fo is specified (when fo is not ZDF, ZDC, PDC, or PDF) because fo cannot be distinguished from f (except for ZDF, ZDC, PDC, or PDF). For example, if SYM1 is defined as 5,8,Y4T, SYM1,TO=PD is transformed to 5,8,Y4T,TO=PD, whereas SYM1,PD is transformed to 5,4,PD. Thus, you should always use symbol,TO=fo rather than symbol,fo when dealing with symbols for p,m,Y4x fields.

A symbol for p,m,Y4x results in substitution of p,m,Y4x unless symbol,f or symbol,HEX is specified.

A symbol for 'string' always results in substitution of C'string'.

Example 1
	INREC FIELDS=(Start_col:C_Field2,2X,C_Field1,F,Stopper,5C'*',
     Z_Field1,Dept_col:Depts,X,P_Field1,TO=FS,X,Z_Field1,M10,
     Z_Field1,MUL,(P_Field1,SUB,LIMIT),EDIT=(SIIIIIT.TT),SIGNS=(+,-))	 
will be transformed to:
  INREC FIELDS=(11:4,2,2X,6,5,F,X'FFFFFF',5C'*',22,8,55:C'J82,L92,M72',X*
              ,30,4,PD,TO=FS,X,22,8,ZD,M10,22,8,ZD,MUL,(30,4,PD,SUB,+1*
              2500),EDIT=(SIIIIIT.TT),SIGNS=(+,-))
Example 2
 OUTREC FIELDS=(RDW,  ** Record Descriptor Word **
                    Z_Field1,2Z,
                    3C'Symbol cannot be used for a repeated constant',
                    Code_1,Flags,
                    Variable_Fields)  ** Variable part of input record
will be transformed to:
 OUTREC FIELDS=(1,4,22,8,2Z,3C'Symbol cannot be used for a repeated con*
               stant',C'86A4Z',35,1,451)
Example 3
  INREC PARSE=(Class_value=(STARTAFT=Class_constant,
                ENDBEFR=End_constant,FIXLEN=8),
        Students_value=(STARTAFT=Students_constant,
                ENDBEFR=End_constant,FIXLEN=n5)),
    BUILD=(Class_value,3X,Students_value,UFF,M11,LENGTH=n5)  
will be transformed to:
  INREC PARSE=(%00=(STARTAFT=C'CLASS=(',ENDBEFR=C')',FIXLEN=8),%01=(STAR*
                TAFT=C'STUDENTS=(',ENDBEFR=C')',FIXLEN=5)),BUILD=(%00,3X*
                ,%01,UFF,M11,LENGTH=5)

IFTHEN WHEN=(logexp), IFTHEN BEGIN=(logexp) and IFTHEN END=(logexp) operands: You can use symbols where you can use fields (p1,m1,f1 and p1,m1 and p2,m2,f2 and p2,m2) and constants (n, +n, -n, C'xx...x', X'yy...yy', Y'yyx...x' and B'bbbbbbbb...bbbbbbbb'). A symbol for p,m,f results in substitution of p,m if symbol,f is specified. A symbol for 'string' always results in substitution of C'string'.

Example 1
  INREC IFTHEN=(WHEN=(Lookup,EQ,Entry1),OVERLAY=(75:Value1)),
        IFTHEN=(WHEN=(Lookup,EQ,Entry2),OVERLAY=(75:Value2))
will be transformed to:
  INREC IFTHEN=(WHEN=(52,1,BI,EQ,X'05'),OVERLAY=(75:C'Read')),IFTHEN=(WH*
                EN=(52,1,BI,EQ,X'20'),OVERLAY=(75:C'Update'))
Note: You can use a symbol for Y'DATEx', Y'DATEx'+n or Y'DATEx'-n (where x is 1, 2 or 3) in the WHEN, BEGIN or END operand, but you cannot use symbol+n or symbol-n to substitute Y'DATEn'+n or Y'DATEn'-n in the WHEN, BEGIN or END operand. See the discussion of "INCLUDE and OMIT" for further details.

KEYWORD=n operands: You can use a symbol where you can use a number (n) with the IFOUTLEN, RECORDS, ABSPOS, SUBPOS, ADDPOS, FIXLEN, REPEAT, STARTPOS, ENDPOS, MAXLEN, DO, ID, SEQ, START, INCR and LENGTH operands.

Example 1
  OUTREC IFOUTLEN=len80,                                
    IFTHEN=(WHEN=GROUP,RECORDS=n5,PUSH=(at81:ID=n6))
will be transformed to:
  OUTREC IFOUTLEN=80,IFTHEN=(WHEN=GROUP,RECORDS=5,PUSH=(81:ID=6)) 

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014