×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On 13 Mar 2013 07:38, Cyndi Bradberry wrote:
We have a compile time array that is used in many programs.
At this time, I cannot get rid of it, but I am trying to put
it into a copy member to include into the programs instead
of having it all over the place.
<<SNIP>>
Is this just something that doesn't work ?
The topic seems more appropriate for the RPG list. Regardless, I offer:
Perhaps test compiling the following, as a simple functional example
from v5r3, for getting both the declaration of the array and the Array
Source Records via a /COPY directive or a /INCLUDE directive:
SrcMbr=ARRAY:
H dftactgrp(*no) debug
* both /COPY and /INCLUDE work fine for either
*COPY ARRAYDCL
/INCLUDE ARRAYDCL
/free
DoW i <= %elem(str) ;
DSPLY str(i) '*EXT' ;
i = i + 1 ;
enddo;
*inlr = *on;
/end-free
*COPY ARRAYCTDTA
/INCLUDE ARRAYCTDTA
SrcMbr=ARRAYDCL:
D i S 5u00 inz(1)
DSTR S 30A dim(3) varying CTDATA
SrcMbr=ARRAYCTDTA:
**CTDATA str
This is the first line of text
This is the second line of text
This is the third line of text
H dftactgrp(*no) debug
*COPY ARRAYDCL
/INCLUDE ARRAYDCL
/free
DoW i <= %elem(str) ;
DSPLY str(i) '*EXT' ;
i = i + 1 ;
enddo;
*inlr = *on;
/end-free
*COPY ARRAYCTDTA
/INCLUDE ARRAYCTDTA
**CTDATA str
This is the first line of text
This is the second line of text
This is the third line of text
This is the fourth line of text
This is the fifth line of text
D i S 5u00 inz(1)
DSTR S 30A dim(5) varying CTDATA
As an Amazon Associate we earn from qualifying purchases.