× 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.



I think so. I have several more lines of initialization values. If I understand it correctly, I can overlay the entire DS, instead of one part, as you show. I have a weird keymaping issue to resolve - I need to get a ^ character in a string, but I am only getting the logical NOT symbol. Ran into this 12 years ago. Just need to remember how I fixed that.

Thanks for the syntax lesson.

John McKee

-----Original message-----
From: Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx
Date: Tue, 30 Aug 2011 14:13:26 -0500
To: Midrange Systems Technical Discussion midrange-l@xxxxxxxxxxxx
Subject: Re: Array initialization

Perhaps this will work for you?
dcode128 ds qualified
d filler 16a Inz('ABCDEFGHIJK12345')
D code128Table 1a Dim(16) overlay(filler)



From: "John McKee" <jmmckee@xxxxxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Date: 08/30/2011 01:59 PM
Subject: Array initialization
Sent by: midrange-l-bounces@xxxxxxxxxxxx



Maybe this should be on RPG list. Just seems so stupid.

In COBOL, I could do something like this:

01 CODE128.
05 FILLER PIC X(10) VALUE 'ABCDEFGHIJ'.
05 FILLER PIC X(1) VALUE 'K'.
05 FILLER PIC X(5) VALUE '12345').

01 CODE128TABLE REDEFINES CODE128.
05 CODE128-CHARACTER PIC X OCCURS 16 TIMES.

How do I do this in RPG IV? Specifically, in my example above, I will
need to put binary patters in some places, and printable characters in
others. I know that a DS can be used to do this. I am just stuck on how
to set the values in the DS. I thought the keyword was inz. But, even if
correct, that can't be used in a DS. What I would >like< to do is use
printed characters as much as possible and resort to the hex value only
when needed.

I would have just tossed it in as a compile time table, except for some
patters that are not printable characters. Could also do a brute force
initialization in C-specs - but if that could be avoided.....

John McKee
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.