z/OS DFSORT: Getting Started
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Character strings

z/OS DFSORT: Getting Started
SC23-6880-00

The format for repeating a character string is:
C'x...x'

where x is an EBCDIC character. For example, C'FERN'.

The format for repeating a character string is:
nC'x...x'
where n can be from 1 to 4095; n repetitions of the character string (C'x...x') are inserted into the reformatted records. If n is omitted, 1 is used instead.

If you want to include a single apostrophe in the string, you must specify it as two single apostrophes. For example, O’NEILL must be specified as C'O''NEILL'.

You can use special keywords to insert a character string or packed decimal constant for the current date or time of the run in various forms, as detailed in z/OS DFSORT Application Programming Guidez/OS DFSORT Application Programming Guide. For example, suppose you want to insert the following at the end of each 80 byte record:
  • the string 'Timestamp: '
  • the date of the run in the form C'yyyy/mm/dd',
  • a blank, and
  • the time of the run in the form C'hh:mm'
Here's the OUTREC statement:
  OUTREC FIELDS=(1,80,C'Timestamp: ',DATE1(/),X,TIME2(:))
You can also use special keywords to specify a character string or packed decimal constant for a future or past date (relative to the current date of the run) in various forms, as detailed in z/OS DFSORT Application Programming Guide. For example, suppose you want to insert the following at the start of each 20-byte record:
  • the current date - 7 days in the form C'yyyyddd',
  • a blank, and
  • the current date + 14 days in the form C'yyyyddd'.
Here's the OUTREC statement:
  OUTREC FIELDS=(DATE3-7,X,DATE3+14,1,20)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014