Hi again.

Thanks to you all. Going up one level worked nicely.


Mvh.

Geir.

"Keep it simple!"


-----Opprinnelig melding-----
Fra: cobol400-l-bounces@xxxxxxxxxxxx [mailto:cobol400-l-bounces@xxxxxxxxxxxx] På vegne av Zangare, Basil (GE Comm Fin, non-ge)
Sendt: 15. desember 2008 17:09
Til: COBOL Programming on the iSeries/AS400
Emne: Re: [COBOL400-L] R: Initializing tabels

Try this it works.

01 WS-TABLE-TEST. <-------------initialize this group item.
05 WS-TABLE OCCURS 10 TIMES.
10 WS-ELEM PIC 999.
.
.
.
.
INITIALIZE WS-TABLE-TEST.


Initialize one level above the table and all the elements light up with zeros.


-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx [mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Finucci Domenico
Sent: Monday, December 15, 2008 9:02 AM
To: COBOL Programming on the iSeries/AS400
Subject: [COBOL400-L] R: Initializing tabels

Good morning: you should have a compiler-generated warning because as such ws-tabel and ws-elem are not subscripted, and first occurrence only is considered.
Is it an OPM program ?
D




Domenico Finucci
E-mail: domenico.finucci@xxxxxxxxxxxx
Sito internet: www.fiditalia.it
P Print this mail only if necessary



-----Messaggio originale-----
Da: cobol400-l-bounces@xxxxxxxxxxxx [mailto:cobol400-l-bounces@xxxxxxxxxxxx] Per conto di geir.kildal@xxxxxxxxxx
Inviato: lunedì 15 dicembre 2008 14.25
A: cobol400-l@xxxxxxxxxxxx
Oggetto: [COBOL400-L] Initializing tabels


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!"


--
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list To post a message email: COBOL400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/cobol400-l.


Il presente messaggio di posta elettronica e ogni eventuale documento a quest'ultimo allegato hanno carattere riservato e sono ad esclusivo utilizzo del destinatario indicato in indirizzo. Qualora non foste il destinatario del presente messaggio Vi preghiamo di volerci avvertire immediatamente tramite posta elettronica o telefonicamente e di cancellare il presente messaggio e ogni documento ad esso allegato dal Vostro sistema. E' vietata la duplicazione o l'utilizzo per qualunque fine del presente messaggio e di ogni documento ad esso allegato cosi come la relativa divulgazione, distribuzione o inoltro a terzi senza l'espressa autorizzazione del mittente. Il mittente, in ragione del mezzo di trasmissione utilizzato, non assume alcuna responsabilità in merito alla segretezza e riservatezza delle informazioni contenute nel presente messaggio e nei relativi allegati.

******************************************************************************
This message and any attachments (the "message") are confidential and intended solely for the addressees.
Any unauthorised use or dissemination is prohibited.
E-mails are susceptible to alteration.
Fiditalia shall not be liable for the message if altered, changed or falsified.

--
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list To post a message email: COBOL400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/cobol400-l.

--
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list To post a message email: COBOL400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/cobol400-l.


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