The following is an example of using the CHGDTAARA and RTVDTAARA commands for character substring operations.
This example:
To do this, the following commands would be entered:
DCL VAR(&CLVAR1) TYPE(*CHAR) LEN(5)
.
CRTDTAARA DTAARA(MYLIB/DA1) TYPE(*CHAR) LEN(10) +
VALUE('ABCD5678IJ')
.
.
.
CHGDTAARA DTAARA((MYLIB/DA1) (5 4)) VALUE('EFG')
RTVDTAARA DTAARA((MYLIB/DA1) (5 5)) RTNVAR(&CLVAR1)
The variable &CLVAR1 now contains 'EFG I'.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.