When a prototyped parameter is defined
as variable-length (with the VARYING, VARCHAR,
VARGRAPH or VARUCS2 keyword),
and without either the CONST or VALUE keyword, the passed parameters must
have the same size of length prefix as the prototyped parameter. This rule
applies even if OPTIONS(*VARSIZE) is specified. 
A more convenient way to specify variable-length subfields is
to use length notation, and to use the POS keyword in a free-form definition
or the OVERLAY keyword in a fixed-form definition to specify the position
of the subfield within the data structure. 
The following is an example of defining variable-length character fields:
*.. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... *
DName+++++++++++ETDsFrom+++To/L+++IDc.Functions++++++++++++++++++++++++++++
* Standalone fields:
D var5 S 5A VARYING
D var10 S 10A VARYING INZ('0123456789')
D largefld_a S 32767A VARYING
D max_len_a S A VARYING LEN(16773100)
DCL-S free_form_10A VARCHAR(10);
* Prerun-time array:
D arr1 S 100A VARYING FROMFILE(dataf)
* Data structure subfields:
D ds1 DS
* Subfield defined with length notation:
D sf1_5 5A VARYING
D sf2_10 10A VARYING INZ('0123456789')
* Subfield defined using positional notation: A(5)VAR
D sf4_5 101 107A VARYING
* Subfields showing internal representation of varying:
D sf7_25 100A VARYING
D sf7_len 5I 0 OVERLAY(sf7_25:1)
D sf7_data 100A OVERLAY(sf7_25:3)
* Free-form varying subfields:
sf8_10 VARCHAR(10);
sf9_13 VARCHAR(13 : 4);
* Procedure prototype
D Replace PR 32765A VARYING
D String 32765A CONST VARYING OPTIONS(*VARSIZE)
D FromStr 32765A CONST VARYING OPTIONS(*VARSIZE)
D ToStr 32765A CONST VARYING OPTIONS(*VARSIZE)
D StartPos 5U 0 VALUE
D Replaced 5U 0 OPTIONS(*OMIT)
* .. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+...
DName+++++++++++ETDsFrom+++To/L+++IDc.Functions++++++++++++++++
*-------------------------------------------------------------
* Graphic fields
*-------------------------------------------------------------
* Standalone fields:
D GRA20 S 20G VARYING
D MAX_LEN_G S 8386550G VARYING
DCL-S free_form_10G VARGRAPH(10);
* Prerun-time array:
D ARR1 S 100G VARYING FROMFILE(DATAF)
* Data structure subfields:
D DS1 DS
* Subfield defined with length notation:
D SF3_20 20G VARYING
* Subfield defined using positional notation: G(10)VAR
D SF6_10 11 32G VARYING
*-------------------------------------------------------------
* UCS-2 fields
*-------------------------------------------------------------
D MAX_LEN_C S 8386550C VARYING
DCL-S free_form_10C VARUCS2(10);
D FLD1 S 5C INZ(%UCS2('ABCDE')) VARYING
D FLD2 S 2C INZ(U'01230123') VARYING
D FLD3 S 2C INZ(*HIVAL) VARYING
D DS_C DS
D SF3_20_C 20C VARYING
* Subfield defined using positional notation: C(10)VAR
D SF_110_C 11 32C VARYING