STR

Synopsis

HELP:   Write date field as ASCII/EBCDIC digit string [default]
TYPE:   OBJECT
SYNTAX: STR(PATTERN='str',CHRSET=num/NONE/SYSTEM/ASCII/UCS1/UTF8/EBCDIC/UCS2BE/UTF16BE/UCS2LE/UTF16LE/UCS4BE/UTF32BE/UCS4LE/UTF32LE/LOCAL,PAD=num,WIDTH=num)

Description

Writes the date field as an ASCII or EBCDIC digit string.

The optional PATTERN parameter specifies the output byte layout (e.g. PATTERN='YYYYMMDD'). When omitted, the output format mirrors the input side PATTERN so that round-trips are lossless.

The CCS parameter specifies the target character set. When omitted, the output is written as an ASCII string (UTF-8 compatible). A CCS value such as 'IBM-1047' causes the output string to be converted from UTF-8 to the specified code page via ICV before writing, producing an EBCDIC-encoded date string suitable for mainframe consumption.

PAD specifies an ASCII pad character code (e.g. 0x20 for space) that is appended to the output string when it is shorter than WIDTH characters.

WIDTH specifies the target field width. When 0 (default), no padding is applied and the output string length is determined solely by the PATTERN token string.

Arguments