Code Comments
Programming Forum and web based access to our favorite programming groups.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?
Post Follow-up to this message"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? >
Post Follow-up to this messageI 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? >
Post Follow-up to this messageHi, 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.
Post Follow-up to this messageThanks 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 wfor an interview, never had to do this before.
Post Follow-up to this message> one for each (named) elementary item in the record, Except for redefininitions.
Post Follow-up to this messageYou 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 > wfor an interview, never had to do this before. >
Post Follow-up to this messagerockocubs 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 wfor an interview, never had to do this before. See also: http://www.netcobol.com/download/index.htm#2
Post Follow-up to this message"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 > wfor 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
Post Follow-up to this messageSee 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 > wfor an interview, never had to do this before. >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.