Data Fields (p,l) or (%pp) Subparameters - mfx - 3.1

Syncsort™ MFX Programmers Guide

Product type
Software
Portfolio
Integrate
Product family
Syncsort™ Software
Product
Syncsort™ MFX > MFX
Version
3.1
Language
English
Content type
Programmer’s Guide
Product name
Syncsort™ MFX
Title
Syncsort™ MFX Programmers Guide
Copyright
2024
First publish date
2010
Last updated
2024-08-27
Published on
2024-08-27T08:14:56.318001
Use the FIELDS subparameters to accomplish these tasks:
  • Specify the column in which a field should begin.
  • Specify halfword, fullword, or doubleword alignment.
  • Convert a numeric field to a printable format with editing capabilities.
  • Convert numeric data to another numeric data format.
  • Perform minimum and maximum functions and arithmetic operations (multiplication, division, modulus, addition, subtraction) with numeric fields and constants.

  • Change an input field to a replacement value in the reformatted output record if the input field equals a search constant. The replacement value can be a constant or another field from the input record.

  • Convert a field to its printable hexadecimal representation.
  • Left-justify, right-justify or “squeeze” (remove additional blanks) the data in a field.
  • Create a variable-length field from justified or squeezed fields.
  • Change the case of EBCDIC letters from lowercase to uppercase or vice-versa, translate ASCII characters to EBCDIC ones or vice-versa, or transform data to printable hexadecimal (0-9 or A-F) or binary (0 or 1), or vice-versa, or translate data based on an alternative collating sequence (ALTSEQ) table in effect.
  • Convert date data.
    • Convert a 2-digit year field to a 4-digit year field.
    • Convert a full-date field to a printable field with separators.
    • Convert any full-date field to a Gregorian or Julian date field.

The figure below illustrates how the FIELDS subparameters should be specified and describes their functions. For information on the EDIT, LENGTH, Mm, and SIGNS subparameters, see How to Convert Numeric Data.

Figure 1. FIELDS Subparameters Format

Each data field specified in the FIELDS parameter is identified either by its position p and length l or by its %pp identifier for parsed fields.
p

For INREC, the position value indicates the first byte of the field relative to the beginning of the input record after E15 processing, if specified, has completed. For OUTREC, the position value indicates the first byte of the field after both E15 and INREC processing, if specified, have completed. If the OUTREC parameter of the OUTFIL control statement is used, the position value refers to the record after E35 processing as well. The field must begin on a byte boundary.

l

The length value indicates the length of the field. The length must be an integer number of bytes.

%pp

Identifies a fixed-length parsed field. See PARSE Parameter (Optional) for information on creating parsed %pp fields.

The following describes the c: subparameter:

c:

Use the c: subparameter to define the column in which the field should begin. MFX will add the appropriate number of blanks to achieve the proper alignment. This subparameter can be specified for all types of fields.

The term expression represents the following syntax:

Figure 2. Syntax for expression

The following describes the elements of expression:
p,l,fi

This specifies the position, length, and format of an input field. (See the description of fi below for details.)

%pp,fi

Identifies a fixed-length parsed field and format. (See the description of fi below for details.)

+n

This represents a positive numerical constant of up to 31 decimal digits. The + sign must be specified.

-n

This represents a negative numerical constant of up to 31 decimal digits. The - sign must be specified.

expression

An expression defines a numeric value. The simplest forms of an expression consist of a numeric data input field defined either by p,l,fi or a constant defined by +n or -n. Expressions can also be created by connecting these simple expressions with operators, as shown in the last line of the above syntax illustration. Parentheses may be used to change the default precedence order of the operators. Algebraic equations can thus be represented with an expression.

A maximum value of 31 digits is permitted at all times in evaluating an expression. If this is exceeded, a critical error will be issued. Similarly, an attempted division by zero will also result in a critical error. The results of division will be rounded down to an integer.

Once an expression has been defined, its value can either be converted to a numeric output data format or to a printable numeric format using editing masks. See How to Convert Numeric Data. The default is to use the M0 editing mask to create printable output. The number of digits in an expression is defined to be 31 unless the expression is a simple p,l,fi field.

The following are expressions:
+10
10,2,Y2Z
+10,ADD,10,2,Y2Z
1,4,ZD
10,2,PD
+30
1,4,ZD,ADD,10,2,PD
+30,MUL,(1,4,ZD,ADD,10,2,PD)
+30,MUL,(1,4,ZD,ADD,10,2,PD),MIN,(5,5,ZD,DIV,+100)
(+30,MUL,(1,4,ZD,ADD,10,2,PD)),MIN,(5,5,ZD,DIV,+100)

)

operator

Operations between two numeric fields or constants are performed with operators. There are two types of operators: function operators and arithmetic operators. The following are the function operators:
   
MIN

Generates the minimum arithmetic value of two specified fields.

MAX

Generates the maximum arithmetic value of two specified fields.

The following are the arithmetic operators:
   
MUL multiplication
DIV division
MOD modulus
ADD addition
SUB subtraction
The following rules of arithmetic precedence apply in computing an “expression”:
  • Conditions within parentheses are evaluated first, from innermost to outermost parentheses.

  • The arithmetic functions of minimum and maximum (MIN and MAX) are performed before the arithmetic operators (MUL, DIV, MOD, ADD, SUB). Within the arithmetic operators, multiplication (MUL), division (DIV), and modulus (MOD) are performed before addition (ADD) and subtraction (SUB). Operations within the same precedence level are performed from left to right.

    The result of the DIV operation is truncated (rounded down) to an integer. The MOD operation produces an integer remainder with the sign of the dividend.

fi

Use this parameter together with p,l to define the input format of a numeric field that is part or all of an expression. The expression will then be converted to either another numeric data format or to a printable format. In such cases, indicate the format of the data field that is to be converted by replacing fi with BI, FI, FL, PD, ZD, CSF/FS, PD0, SFF, UFF, one of the SMF formats (DT1, DT2, DT3, TM1, TM2, TM3, and TM4), time-of-day (TOD) formats (DC1, DC2, DC3, TC1, TC2, TC3, TC4), extended time-of-day (ETOD) formats (DE1, DE2, DE3, TE1, TE2, TE3, TE4), or one of the year data formats (Y2B, Y2C, Y2D, Y2P, Y2S, Y2Z, Y2T, Y2U, Y2V, Y2W, Y2X, Y2Y, Y4T, Y4U, Y4V, Y4W, Y4X, Y4Y).

Also use this parameter when a 2-digit packed decimal year value is to be expanded to a 4-digit packed decimal value. In such cases replace fi with Y2ID or Y2IP. The Y2ID and Y2IP formats cannot be used to form complex arithmetic expressions and do not allow the specification of mask (Mm), EDIT, SIGNS, or LENGTH.

An l value indicating the length of the field must be specified in accordance with the following allowable values:

for BI ... 1-8 inclusive

for CSF or FS ... 1-16 inclusive (15-digit limit)

for CSF or FS ... 17-32 inclusive (31-digit limit)

for FI ... 1-8 inclusive

for FL ... 4 or 8

for PD ... 1-16 inclusive

for PD0 ... 2-8 inclusive

for SFF ... 1-44 inclusive (31-digit limit)

for UFF ... 1-44 inclusive (31-digit limit)

fi

for Y2B ... 1

for Y2C ... 2

for Y2D ... 1

for Y2ID ... 1

for Y2IP ... 2

for Y2P ... 2

for Y2S ... 2

for Y2Z ... 2

for ZD ... 1-31 inclusive

for Y2T ... 3-6 inclusive

for Y2U ... 2-3 inclusive

for Y2V ... 3-4 inclusive

for Y2W ... 3-6 inclusive

for Y2X ... 2-3 inclusive

for Y2Y ... 3-4 inclusive

for Y4T ... 7 or 8

for Y4U ... 4

for Y4V ... 5

for Y4W ... 7 or 8

for Y4X ... 4

for Y4Y ... 5

fi

Field conversion of a single p,l,fi expression with a format of Y2x, Y2xx, Y4x does not default to the use of the M0 default output mask. Y4x fields will be converted to printable format and for Y2x/Y2xx fields the default will convert the 2-digit year portion to a 4-digit 4-byte printable year. The year portion of the date is converted using the century window defined by the CENTWIN parameter. The century window is not used for the special values, which are only expanded with characters of the proper format. However, except for Y2S, Y2x and Y4x, fields can be used to form expressions with operators. In this case, the default will use the M0 output mask with a number of decimal digits determined by the terms used in the expression. For more information, see How to Convert Numeric Data. The specification of an output numeric data format fo or mask Mm, EDIT, SIGNS, or LENGTH is permitted except when using Y2S, Y2ID, and Y2IP.

Field conversion of a single p,l,fi expression with a format of FL will convert a hexadecimal floating point value (4-byte or 8-byte) to a signed integer in the range of -9223372036854775808 to 9223372036854775807, with the fractional part of the FL value dropped. A z/Architecture environment is required before specifying FL format; otherwise, an error message and termination of the application will result.

The following describes the other FIELDS subparameters:
fo

Use this subparameter to define the output numeric data format of an expression.

TO=fo

When fo is specified, mask Mm, EDIT, and SIGNS cannot be specified. Indicate the desired format of the output field by replacing fo with BI, CSF/FS, FD, FI, PD, PDC, PDF, ZD, ZDC or ZDF. The PDC format represents a PD field and uses a C for the sign of a positive value and D for the sign of a negative value. The ZDC format represents a ZD field and uses a C for the sign of a positive value and D for the sign of a negative value. PDF produces the same numerical value as PD, but uses an F for a positive sign and D for the sign of a negative value. ZDF produces the same numerical value as ZD, but uses an F for a positive sign and D for the sign of a negative value. See How to Convert Numeric Data for the default lengths of these fields. See LENGTH=n Subparameter for how this default may be changed.

TO=fo is equivalent to fo and in general, there is no reason to use the TO= form. However, if you are using a data dictionary symbol in your control statement, you should use the TO=fo form to avoid ambiguities with certain types of data conversions. See the section INREC, OUTREC, OUTFIL TO Subparameter .

Mm

Use the Mm subparameter to indicate that one of the 27 MFX-provided editing masks, M0-M26, is to be used. Replace 'm' with the mask number. For details, see Mm Subparameter (Editing Masks).

EDIT=(pattern)

Use the EDIT subparameter to specify that a user-provided editing mask should be used to format the output fields. For details, see EDIT Subparameter.

SIGNS=(s1,s2,s3,s4)

Use the SIGNS subparameter to specify the signs that will appear before or after the edited number. For details, see SIGNS Subparameter.

LENGTH=n

Use the LENGTH subparameter to alter the length of the output field. This is normally determined by the number of numeric digits d and either the data format or the edit pattern and format of the edited field. For details, see LENGTH=n Subparameter.

a

Use this subparameter to tell MFX how the field should be aligned with respect to the start of the output record. Replace a with H, F, or D to specify halfword (H), fullword (F), or doubleword (D) alignment. The alignment itself actually takes place after the column designation. It will automatically pad any provided field with the number of bytes of binary zeros required to achieve the specified alignment. This subparameter cannot be used in conjunction with data conversion.

CHANGE=(........)/

NOMATCH=(...)

Use the CHANGE subparameter to change an input field to a replacement constant or input record field in the reformatted output record if the input field equals a search constant. For a complete description, see CHANGE Subparameter.

JFY=(...)

Use the JFY subparameter to specify that an input field be processed for left-justification or right-justification for the output record. For left-justification, leading blank characters are eliminated; the remaining characters are shifted left; if necessary, blank characters are introduced to the right. For right-justification, trailing blank characters are eliminated; the remaining characters are shifted right; if necessary, blank characters are introduced to the left. Options include introducing new leading and trailing nonblank characters; eliminating previous leading and trailing nonblank characters; and changing the length of the field in the output record. For a complete description and options, see JFY Subparameter.

SQZ=(...)

Use the SQZ subparameter to specify that an input field be processed for “left-squeezing” or “right-squeezing” for the output record. SQZ includes the justification functions of the JFY subparameter but adds elimination of all blank characters in the input field and additional options for selecting and replacing blank and nonblank characters, which include introducing leading and trailing nonblank characters; replacing userspecified nonblank characters with blank characters prior to squeeze operation; replacing blank characters with user-specified nonblank characters; retaining blank characters between paired apostrophes and paired quotes; and changing the length of the field in the output record. For a complete description and options, see SQZ Subparameter.

HEX

Use the HEX subparameter to convert a record field to its hexadecimal representation. Specify this subparameter immediately after the position p and the length l of the field to be converted. Specify p,l,HEX for both fixed-length records and the fixed-length portion of variable-length records. Specify p,HEX for the variable-length portion of variable-length records. Starting in position p of the input record, for a length of l, each byte will be converted to its hexadecimal representation. Note that in the reformatted record, the converted field will be twice the length of the original field.

TRAN Use this subparameter to change the case of EBCDIC letters from lowercase to uppercase or vice-versa, translate ASCII characters to EBCDIC ones or vice-versa, transform data to printable hexadecimal (0-9 or A-F) or binary (0 or 1), or vice-versa, or translate data based on an alternative collating sequence (ALTSEQ) table in effect. Specify this subparameter immediately after the position p and the length l of the field to be converted. Specify p,l,TRAN for both fixed-length records and the fixed-length portion of variable-length records. Specify p,TRAN for the variable-length portion of variable-length records. Starting in position p of the input record, for a length of l, each byte will be converted as per specification.
TRAN
Figure 3. TRAN Subparameter Format

LTOU
Instructs MFX to translate EBCDIC letters in a specified field from lowercase to uppercase.
UTOL
Instructs MFX to translate EBCDIC letters in a specified field from uppercase to lowercase.
ALTSEQ
Instructs MFX to translate characters based on the ALTSEQ table in effect.
ATOE
Instructs MFX to translate characters in a specified field from ASCII to EBCDIC. The maximum input length is 32752.
ETOA
Instructs MFX to translate characters in a specified field from EBCDIC to ASCII. The maximum input length is 32752.
HEX
Instructs MFX to transform data to printable hexadecimal. The number of output bytes will be 2x the number of input bytes. The maximum input length is 16376. For example, C'B9' is transformed into C'C2F9'.
UNHEX
Instructs MFX to transform data from printable hexadecimal to its character representation. Each two input bytes are translated to one output byte, so the number of output bytes will be one-half the number of input bytes, rounded up. If the input length is an odd number, the output will be padded with binary zeros in the last half-byte. The maximum input length is 32752. Input bytes that are not in the range 0-9 or A-F will be treated as 0. For example, C'C4FX5' is interpreted as C'C4F050' and is transformed into C'D0&'.
BIT
Instructs MFX to transform data to printable binary. The number of output bytes will be 8x the number of input bytes. The maximum input length is 4094. For example, C'F12' is equivalent to X'C6F1F2' and is transformed into C'110001101111000111110010'.
UNBIT
Instructs MFX to transform data from printable binary to its character representation. Each eight input bytes are translated to one output byte, so the number of output bytes will be one-eighth the number of input bytes, rounded up. If the input length is not a multiple of 8, the output will be padded with binary zeros in the last byte. The maximum input length is 32752. Input bytes that are not 0 or 1 will be treated as 0. For example, C’1111a02111001' is interpreted as C'1111000111001000' (or X'F1C8') and is transformed into C'1H'.

For examples of OUTREC control statements that use the TRAN subparameter, see figures Sample OUTREC Control Statement and Sample OUTREC Control Statement.

fy2f(c)

Use this subparameter together with the p,l elements to indicate the conversion of a full-date field to a printable date with separator character(s). The “c” represents the separator and can be any character except a blank. For Y2x fields, the year portion of the date is converted to a 4-digit year using the century window defined by the CENTWIN parameter. The century window is not used for the special values, which are expanded with characters of the proper format. (See Full-Date Field Conversions.)

The following table shows what is produced if (c) is set to a “/”:
Table 1. Full-Date Field Conversions

Full-Date

Format

Date Form

Input Length (bytes)

Output Format

 Y2T

yyx

3

yyyy/x

yyxx 4 yyyy/xx
yyxxx 5 yyyy/xxx
yyxxxx 6 yyy/xx/xx

Y2U

yyx

(X'yyxs')

2

yyyy/x

yyxxx

(X'yyxxxs')

3 yyyy/xxx

Y2V

yyxx

(X'0yyxxs')

3

yyyy/xx

yyxxxx

(X'0yyxxxxs')

4 yyyy/xx/xx

Y2W

 

xyy

3

x/yyyy

xxyy 4 xx/yyyy
xxxyy 5 xxx/yyyy
xxxxyy 6 xx/xx/yyyy

Y2X

xyy

(X'xyys')

2

x/yyyy

xxxyy

(X'xxxyys')

3 xxx/yyyy

Y2Y

xxyy

(X'0xxyys')

3

xx/yyyy

xxxxyy

(X'0xxxxyys')

4 xx/xx/yyyy
fy2fP

Use this subparameter together with the p,l elements to indicate the conversion of a full-date field to a packed decimal format. The year portion of the date is converted to a 4-digit year using the century window defined by the CENTWIN parameter. The century window is not used for the special values, which are expanded with characters of the proper format. See Full-Date Field Conversions fy2fP.

Table 2. Full-Date Field Conversions fy2fP

Full-Date

Format

Date Form

Input Length (bytes)

Output Format*

 Y2TP

yyx

3

X'yyyyxC'

yyxx 4 X'0yyyyxxC'
yyxxx 5 X'yyyyxxxC'
yyxxxx 6 X'0yyyyxxxxC'

Y2UP

yyx

(X'yyxs')

2

X'yyyyxC'

yyxxx

(X'yyxxxs')

3 X'yyyyxxxC'

Y2VP

yyxx

(X'0yyxxs')

3

X'0yyyyxxC'

yyxxxx

(X'0yyxxxxs')

4 X'0yyyyxxxxC'

Y2WP

 

xxyy

3

X'xyyyyC'

xxxyy

4

X'0xxyyyyC'

xxxxyy

5

X'xxxyyyyC'

xxyy

6

X'0xxxxyyyyC'

Y2XP

xyy

(X'xyys')

2

X'xyyyyC'

xxxyy

(X'xxxyys')

3 X'xxxyyyyC'

Y2YP

xxyy

(X'0xxyys')

3

X'0xxyyyyC'

xxxxyy

(X'0xxxxyys')

4 X'0xxxxyyyyC'

Y2PP

x'0yys'

2

X'yyyy'

 

Y2DP

x'yy'

1

X'yyyy'

Y4T

yyyyddd

yyyymmdd

7

8

yyyy/ddd

yyyy/mm/dd

Y4W

dddyyyy

mmddyyyy

7

8

ddd/yyyy

mm/dd/yyyy

Y4U

yyyyddd

(X'yyyyddds')

4

yyyy/ddd

Y4V

yyyymmdd

(X'0yyyymmdds')

5

yyyy/mm/dd

Y4X

dddyyyy

(X'dddyyys')

4

ddd/yyyy

Y4Y

mmddyyyy

(X'0mmddyyyys')

5

mm/dd/yyyy

* 'C' is a positive sign value.

Use this subparameter together with the p,l elements to indicate the conversion of a full-date field to a printable Gregorian date. The resultant field can be created with a separator character by specifying the DT subparameter or without a separator by specifying the DTNS subparameter. For Y2x fields, the year portion of the date is converted to a 4-digit year using the century window defined by the CENTWIN parameter. Invalid input date values will be converted to all nines in the digit fields. All full-date Y2x and YYx fields are vald input fields. See Elements of expression.

DT[=(m1m2m3m4)]

This form of the subparameter converts the date and controls the formatting of the Gregorian date. You can specify the position of the year,month, and day, specify a separator character, and choose between 2-digit and 4-digit year representation. The positions m1 through m4 represent masks used to format the date. To specify the position of the month, day, and year, replace the m1, m2, and m3 positions, in any order, with M for the month (01-12), D for the day (01-31), and either Y or 4 for the year (where Y is a 2-digit year and 4 is a 4-digit year). Replace the m4 position with a separator character. If the mask specification is omitted, a mask of 'MDY/' will be used by default.

For example, if an input field contains a character Julian date in the form of yyddd, then to convert to a Gregorian date in a month, day, 4-digit year format with a / separator, specify p,l,Y2T,DT=(MD4/). For December 31, 2007, the input field would be '07365' and the output Gregorian date would appear as '12/31/2007'.

The field for this form requires 8 bytes for a 2-digit year representation and 10 bytes for a 4-digit year representation. The M,D, and Y or 4 may only appear once in the mask.

DTNS[=(m1m2m3)]

This form of the subparameter specifies that the full date is to be converted in the form m1m2m3', where m1, m2, and m3 indicate the order in which the month, day, and year are to appear and if the year is to appear as two or four digits. For m1, m2, and m3, use M to represent the month (01-12), D to represent the day (01-31), Y to represent the last two digits of the year (for example, 02), or 4 to represent the four digits of the year (for example, 2002). If the mask specification is omitted, a mask of 'MDY' will be used by default.

For example, if an input field contains a character Julian date in the form of yyddd, then to convert to a Gregorian date in a month, day, 4-digit year format, specify p,l,Y2T,DTNS=(MD4). For December 31, 2007, the input field would be '07365' and the output Gregorian date would appear as '12312007'.

The field for this form requires 6 bytes for a 2-digit year representation and 8 bytes for a 4-digit year representation. The M, D, and Y or 4 may only appear once in the mask.

Use this subparameter together with the p,l elements to indicate the conversion of a full-date Gregorian date field to a printable Julian date. The resultant field can be created with a separator character by specifying the YD subparameter or without a separator by specifying the YDNS subparameter. The year portion of the date is converted to a 4-digit year using the century window defined by the CENTWIN parameter. Invalid input date values will be converted to all nines in the digit fields. See Valid Length l and Format f Combinations for the valid formats that can be specified for the Gregorian dates.
Table 3. Valid Length l and Format f Combinations
Full Date Format Date Form Input Length
Y2T yymmdd 6
Y2V X'0yymmdds' 4
Y2W mmddyy 6
Y2Y X'0mmddyys' 4
YD[=(m1m2m3)]

This form of the subparameter converts the Gregorian date and controls the formatting of the Julian date. You can specify the position of the year and day, specify a separator character, and choose between 2-digit and 4-digit year representation. The positions m1 through m3 represent masks used to format the date. To specify the position of the day and year, replace the m1 and m2 positions, in any order, with D for the day (001-366), and either Y or 4 for the year (where Y is a 2-digit year and 4 is a 4-digit year). Replace the m3 position with a separator character. If the mask specification is omitted, a mask of 'DY/' will be used by default.

For example, if an input field contains a character Gregorian date in the form of yymmdd, then to convert to a Julian date in a day and 4-digit year format with a / separator, specify p,l,Y2T,YD=(D4/). For December 31, 2007, the input field would be '071231' and the output Julian date would appear as '365/2007'.

The field for this form requires 6 bytes for a 2-digit year representation and 8 bytes for a 4-digit year representation. The D and Y or 4 may only appear once in the mask.

YDNS[=(m1m2)]

This form of the subparameter specifies that the Gregorian date is to be converted in the form 'm1m2', where m1 and m2 indicate the order in which the day and year are to appear and if the year is to appear as two or four digits. For m1 and m2, use D to represent the day (001-366), Y to represent the last two digits of the year (for example, 02), or 4 to represent the four digits of the year (for example, 2002). If the mask specification is omitted, a mask of 'DY' will be used by default.

For example, if an input field contains a character Gregorian date in the form of yymmdd, then to convert to a Julian date in a day and 4-digit year format, specify p,l,Y2T,YDNS=(D4). For December 31, 2007, the input field would be '071231' and the output Julian date would appear as '3652007'.

The field for this form requires 5 bytes for a 2-digit year representation and 7 bytes for a 4-digit year representation. The D and Y or 4 may only appear once in the mask.

Full-date year fields can be converted to other full-date year-field formats using the TOJUL and TOGREG parameters. For printable output formats, you may insert a separator character. Input and output formats may be either 2-digit years (Y2x fomats) or 4-digit years (Y4x formats). When expanding a 2-digit year field to a 4-digit year field, CENTWIN processing is used to determine the high-order yy. Fulldate year fields can also be converted to an output field that is an indicator of the day of the week of the field using the WEEKDAY parameter. The eligible input formats are:
Table 4. Eligible Input Date Formats for TOJUL, TOGREG, and WEEKDAY

Format

Length

Date Form

Y2T

5

C'yyddd'

Y2T

6

C'yymmdd'

Y2U

3

X'yyddds' (P'yyddd')

Y2V

4

X'0yymmdds' (P'yymmdd')

Y2W

5

C'dddyy'

Y2W

6

C'mmddyy'

Y2X

3

X'dddyys' (P'dddyy')

Y2Y

4

X'0mmddyys' (P'mmddyy')

Y4T

7

C'yyyyddd'

Y4T

8

C'yyyymmdd'

Y4U

4

X'yyyyddds' (P'yyyyddd')

Y4V

5

X'0yyyymmdds' (P'yyyymmdd')

Y4W

7

C'dddyyyy'

Y4W

8

C'mmddyyyy'

Y4X

4

X'dddyyyys' (P'dddyyyy')

Y4Y

5

X'0mmddyyyys' (P'mmddyyy')

fiyxx,TOJUL=foyxx

TOJUL converts full-date Gregorian or Julian year fields into a Julian format full-date field. For printable output fields, TOJUL=foyxx(c) may be used to create an output date with c as the separator, where c can be any character except a blank. The eligible output foyxx formats are listed below along with the length and format of the fields.

Table 5. Julian Date Output Formats

For TOJUL=foyxx

For TOJUL=foyxx(c)

Format

Length

Date Form

Format

Length

Date Form

Y2T 5 C'yyddd' Y2T 6 C'yycddd'
Y2U 3 X'yyddds' (P'yyddd') Y2W 6 C'dddcyy'
Y2W 5 C'dddyy' Y4T 8 C'yyyycddd'
Y2X 3 X'dddyys' (P'dddyy') Y4W 7 C'dddyyyy'
Y4T 7 C'yyyyddd' Y4X 4 X'dddyyyys' (P'dddyyyy')
Y4U 4 X'yyyyddds' (P'yyyyddd') Y4W 8 C'dddcyyyy'
fiyxx,TOGREG=foyxx

TOGREG converts full-date Gregorian or Julian year fields into a Gregorian format fulldate field. For printable output fields, TOGREG=foyxx(c) may be used to create an otuput date with c as the separator, where c can be any character except a blank. The eligible output foyxx formats are listed below along with the length and format of the fields.

Table 6. Gregorian Date Output Formats

For TOGREG=foyxx

For TOGREG=foyxx(c)

Format

Length

Date Form

Format

Length

Date Form

Y2T

6

C'yymmdd'

Y2T

7

C'yycmmdd'

Y2V

4

X'0yymmdds' (P'yymmdd')

Y2W

7

C'mmddcyy'

Y2W

6

C'mmddyy'

Y4T

8

C'yyyymmdd'

Y2Y

3

X'0mmddyys' (P'mmddyy')

Y4T

9

C'yyyycmmdd'

Y4V

5

X'0yyyymmdds' (P'yyyymmdd')

Y4W

9

C'mmddcyyyy'

Y4Y

5

X'0mmddyyyys' (P'mmddyyyy')

Y4W

8

C'mmddyyyy'

fiyxx,WEEKDAY={CHAR3,CHAR9,DIGIT1}

The WEEKDAY parameter creates an output field that is a printable indicator of the day of the week of the full-date input field. There are 3 types of output indicators that you can create. The output field lengths for CHAR3, CHAR9, and DIGIT1 and 3, 9, and 1 respectively. CHAR9 is right-padded with blanks when necessary.

Table 7. WEEKDAY Output Fields

CHAR3

CHAR9

DIGIT1

SUN

MON

TUE

WED

THU

FRI

SAT

SUNDAY

MONDAY

TUESDAY

WEDNESDAY

THURSDAY

FRIDAY

SATURDAY

1

2

3

4

5

6

7