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



cobol400-l-bounces@xxxxxxxxxxxx wrote on 06/04/2008 10:39:39 AM:

----- Message from "Jim Essinger" <dilbernator@xxxxxxxxx> on Tue, 3
Jun 2008 12:02:25 -0600 -----

To:

"COBOL Programming on the iSeries/AS400" <cobol400-l@xxxxxxxxxxxx>

Subject:

Re: [COBOL400-L] COBOL 101 Question

Robert,
. . .
. . .
. . .
. . . . I'm not
sure what you get for date and time datatype fields.

HTH

Jim


Here's the text from the ILE COBOL Language Reference:
"The INITIALIZE statement sets selected categories of data fields to
predetermined values. It is functionally equivalent to one or more MOVE
statements."

Then in the syntax diagram which follows, the following categories are
referred to:
ALPHABETIC
ALPHANUMERIC
NUMERIC
NUMERIC-EDITED
DBCS
DBCS-EDITED
NATIONAL

As Tom noted, any values clause is overridden by the default for the
category--e.g., alpha and alphanumeric to spaces, numeric to zeroes, etc.
You can specify a different value for a data category using the REPLACING
phrase.

I've used the initialize statement for years to initialize complex group
items consisting of a mix of other group items and elementary items,
tables, etc. It's a wonderful and powerful statement--although not a
direct correspondence to the RPG RESET opcode.

Michael Quigley
Computer Services
The Way International
www.TheWay.org

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.