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



The INITIALIZE variable initializes the entire table to spaces - it does the same thing when you initialize an entire record level that contains only numeric elements. To initialize every element, you have to loop through the table.

I can't tell you why but I can assure you it does not work the way you want it to.


John Arnold
(301) 354-2939
-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx [mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike Apice
Sent: Monday, December 15, 2008 9:33 AM
To: COBOL Programming on the iSeries/AS400
Subject: Re: [COBOL400-L] Initializing tabels

I am curiuos too.  I see no reason why that should not work.

--- On Mon, 12/15/08, geir.kildal@xxxxxxxxxx <geir.kildal@xxxxxxxxxx> wrote:

From: geir.kildal@xxxxxxxxxx <geir.kildal@xxxxxxxxxx>
Subject: [COBOL400-L] Initializing tabels
To: cobol400-l@xxxxxxxxxxxx
Date: Monday, December 15, 2008, 8:25 AM

Hi.

Given:

05 ws-tabel occurs 10.
10 ws-elem pic 9.

I expected all 10 ws-elem to be set to zero when 'INITIALIZE ws-table'
was executed. Only ws-elem(1) is set to zero.

What am I doing wrong?


Mvh.

Geir Kildal.

"Keep it simple!"



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.