Page 1 of 1

Assign Values to varible with occurs

PostPosted: Tue May 25, 2010 2:04 am
by masterchecho
Hi all,
I need to assign a value to a variable with an occurs .
For Example : I have the following structure ,which represents a section of the layout of my output file

EMPTY-TRADE W 124 A
EMPTY-01 EMPTY-TRADE 2 A OCCURS 24
EMPTY-02 EMPTY-TRADE +48 2 A
EMPTY-03 EMPTY-TRADE +50 3 A OCCURS 2
EMPTY-03 EMPTY-TRADE +56 68 A

How can I assign the value 'XXX' to EMPTY-03 ??? in order to obtain an 'XXXXXX' in my output file.

Thanks a lot !
Checho.

Re: Assign Values to varible with occurs

PostPosted: Tue May 25, 2010 2:12 am
by dick scherrer
Hello and welcome to the forum,

Why is EMPTY-03 coded twice? Define another field that begins at +50 for a length of 6.

Write a loop to process the 24 EMPTY-01 array elements and set the 6-char field to 'XXXXXX'. Or define the loop to process with a 2-dimensional array.