Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Initialize
Can someone settle an argument for me. Does a initialize on an 01 level
move spaces to pic x fields and zeroes to pic 9 fields or does it move
spaces to the whole 01 level?


Report this thread to moderator Post Follow-up to this message
Old Post
rockocubs
09-27-05 11:55 PM


Re: Initialize
"When the statement is written without the REPLACING phrase, data items of
the categories alphabetic, alphanumeric and alphanumeric edited are set to
spaces; data items of category numeric and numeric edited are set to zeroes.
..."  (ANSI X3.23-1985 page VI-93, 6.17, The INITIALIZE statement, General
Rule 5.)

This doesn't address what your particular implementation actually DOES, but
it does address what the '85 standard says it OUGHT TO DO.

Note that index data items and elementary FILLER data items in the record
aren't affected by INITIALIZE at all, and note also that if an item has a
VALUE clause it isn't "re-applied" by INITIALIZE.

The 2002 standard adds "WITH FILLER" and "TO VALUE" syntax to INITIALIZE to
provide for these issues.

-Chuck Stevens



"rockocubs" <rphipps@nospam.indy.rr.com> wrote in message
 news:175c3e3def2daf1a23aa674f5b3adf87@lo
calhost.talkaboutprogramming.com...
> Can someone settle an argument for me. Does a initialize on an 01 level
> move spaces to pic x fields and zeroes to pic 9 fields or does it move
> spaces to the whole 01 level?
>



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
09-27-05 11:55 PM


Re: Initialize
I neglected to point out that INITIALIZE behavior is the same as a series of
MOVE statements, one for each (named) elementary item in the record, even if
circumstances (and the implementor's cleverness) allows the initialization
to take place using a single transfer of data from somewhere.

-Chuck Stevens

"rockocubs" <rphipps@nospam.indy.rr.com> wrote in message
 news:175c3e3def2daf1a23aa674f5b3adf87@lo
calhost.talkaboutprogramming.com...
> Can someone settle an argument for me. Does a initialize on an 01 level
> move spaces to pic x fields and zeroes to pic 9 fields or does it move
> spaces to the whole 01 level?
>



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
09-27-05 11:55 PM


Re: Initialize
Hi,

Yes, the initialize statement will move Zeros to all numeric variables
(pic 9),
and will move spaces to all non-numeric variables (pic X) to the whole
01 level.
you could also use it on the sub-level (05, 10, 15, etc...) with the
same results.

Kellie.


Report this thread to moderator Post Follow-up to this message
Old Post
Kellie Fitton
09-27-05 11:55 PM


Re: Initialize
Thanks Chuck,
I haven't saw a cobol manual in years. I wonder if there is a new one
online somewhere. That way i could brush up have to take a Cobol test this
w for an interview, never had to do this before.


Report this thread to moderator Post Follow-up to this message
Old Post
rockocubs
09-27-05 11:55 PM


Re: Initialize
> one for each (named) elementary item in the record,

Except for redefininitions.


Report this thread to moderator Post Follow-up to this message
Old Post
Richard
09-27-05 11:55 PM


Re: Initialize
You can (still) download a copy of the 1985 standard for $18.00 from the
ANSI eStandards Store at www.ansi.org.  The Intrinsic Function Amendment and
the Corrections Amendment are included in that price, and are also
downloadable independently at $18 per each.

You can also download the 2002 standard for the same price from the same
place.

From www.ansi.org, click on 'eStandards Store', key in "COBOL" in Search,
then GO.  Document "ANSI INCITS 23-1985 (R2001)" is the 1985 standard with
its amendments, and Document "INCITS /ISO/IEC 1989-2002" is the 2002
standard.

As far as individual vendor's reference manuals for COBOL, I can't answer
for any other companies, but the COBOL85 reference manuals for the Unisys
ClearPath Plus MCP-based systems are accessible without charge from
www.unisys.com.

The way I navigated from there to, say, the COBOL85 "basic implementation"
manual was:

go to www.unisys.com
click on "mainframes" under "products"
click on "Libra Series" under ClearPath Plus MCP Servers
click on "services and support"
click on "Unisys Support Online"
click on "Product Support" in the left column
click on "documentation" in "Access documentation to learn about ..."
type "86001518-307" in the "book number" field.

At this point a list of documents show up, in two categories: the manuals
themselves, and the documentation changes (D-notes) that will eventually be
applied to those manuals.  You're interested in the former, entitled "COBOL
ANSI-85 Programming Reference Manual, Volume 1:  Basic Implementation", in
the list.  Any one of the several that show up will do, but the last one in
the list (#7) has all the most recent D-Notes summarized at the beginning.

If you need to go back that far, COBOL74 Volume 1 (yes, we still actively
support it, though we are no longer adding feature content to it) is "book
number" 86000296-203".  Pick the last one on the list.

-Chuck Stevens

"rockocubs" <rphipps@nospam.indy.rr.com> wrote in message
 news:b1fab2eb9ff8664fa71b5f655e037c25@lo
calhost.talkaboutprogramming.com...
> Thanks Chuck,
>   I haven't saw a cobol manual in years. I wonder if there is a new one
> online somewhere. That way i could brush up have to take a Cobol test this
> w for an interview, never had to do this before.
>



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
09-27-05 11:55 PM


Re: Initialize
rockocubs wrote:
> Thanks Chuck,
>  I haven't saw a cobol manual in years. I wonder if there is a new one
> online somewhere. That way i could brush up have to take a Cobol test
> this w for an interview, never had to do this before.

See also:

http://www.netcobol.com/download/index.htm#2



Report this thread to moderator Post Follow-up to this message
Old Post
HeyBub
09-27-05 11:55 PM


Re: Initialize
"rockocubs" <rphipps@nospam.indy.rr.com> wrote in message
 news:b1fab2eb9ff8664fa71b5f655e037c25@lo
calhost.talkaboutprogramming.com...
> Thanks Chuck,
>  I haven't saw a cobol manual in years. I wonder if there is a new one
> online somewhere. That way i could brush up have to take a Cobol test this
> w for an interview, never had to do this before.


I'm using the Liant RM/COBOL Language Reference Manual as my reference,
which I got from http://www.liant.us/download/pdf/rmclrm75.pdf



Report this thread to moderator Post Follow-up to this message
Old Post
Oliver Wong
09-28-05 11:55 PM


Re: Initialize
See also:

Mainframe Express 3.0 Enterprise Edition -
http://support.microfocus.com/docum...30/mx30indx.htm

Net Express 4.0 -
http://support.microfocus.com/docum...40/nx40indx.htm

Server Express 4.0 SP1 -
http://support.microfocus.com/Docum...p1/sx40indx.htm

--
Stephen

"rockocubs" <rphipps@nospam.indy.rr.com> wrote in message
 news:b1fab2eb9ff8664fa71b5f655e037c25@lo
calhost.talkaboutprogramming.com...
> Thanks Chuck,
>  I haven't saw a cobol manual in years. I wonder if there is a new one
> online somewhere. That way i could brush up have to take a Cobol test this
> w for an interview, never had to do this before.
>



Report this thread to moderator Post Follow-up to this message
Old Post
Stephen Gennard
09-28-05 11:55 PM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:47 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.