Code Comments
Programming Forum and web based access to our favorite programming groups.Per subject. Is the proposed standard available for inspection anywhere ? Roger
Post Follow-up to this messagehttp://www.cobolportal.com/j4/index.asp?bhcp=1 for a list of documents including the current base, still subject to the change proposals and further amendment as necessary.
Post Follow-up to this messageRobert Jones<rjones0@hotmail.com> 05/22/06 1:16 PM >>> >http://www.cobolportal.com/j4/index.asp?bhcp=1 > >for a list of documents including the current base, still subject to >the change proposals and further amendment as necessary. Specifically, http://www.cobolportal.com/j4/files/std.zip Interesting bedtime reading. :-) --- Frank Swarbrick Senior Developer/Analyst - Mainframe Applications FirstBank Data Corporation - Lakewood, CO USA
Post Follow-up to this messageIndeed :-) A couple of things spring to the eye - Where is the BINARY-SUPER-LONG or whatever for binary machine format to 128 bits ? As other numeric formats allow at least 31 digits, this seems like a glaring omission. (Incidentally, why 31 digits ?. Logically this should have been 36 following on from 9, 18 ...) Seems like there is still no facility for interaction with the environment ie. ACCEPT FROM ENVIRONMENT or some such equivalent along with DISPLAY UPON ENVIRONMENT/SET ENVIRONMENT (or equivalents). Or did I miss something ? Roger "Frank Swarbrick" <Frank.Swarbrick@efirstbank.com> schrieb im Newsbeitrag news:4dep5jF19k7mgU2@individual.net... > Robert Jones<rjones0@hotmail.com> 05/22/06 1:16 PM >>> > > Specifically, http://www.cobolportal.com/j4/files/std.zip > > Interesting bedtime reading. > :-) > > > --- > Frank Swarbrick > Senior Developer/Analyst - Mainframe Applications > FirstBank Data Corporation - Lakewood, CO USA
Post Follow-up to this message"Roger While" <simrw@sim-basis.de> wrote in message news:e4uekq$jnf$01$1@news.t-online.com... \ > Where is the BINARY-SUPER-LONG or whatever > for binary machine format to 128 bits ? > As other numeric formats allow at least 31 digits, this seems > like a glaring omission. USAGEs BINARY-CHAR, BINARY-SHORT, BINARY-LONG and BINARY-DOUBLE are all holdovers from '02 COBOL. Note that neither the '02 standard nor the draft specifies what these formats are. As I read the consensus of J4 and WG4 in this area, future formats in which the format and encoding are entirely up to the implementor -- as is the case for these, as well as for the older stuff like COMP, DISPLAY and even BINARY -- are not to be encouraged. By contrast , USAGE FLOAT-DECIMAL-34 has a precise format defined in the currently-being-drafted revision to IEEE 754 (therein referred to as Decimal128). So does FLOAT-BINARY-34 (Binary128). > (Incidentally, why 31 digits ?. Logically this should have been 36 > following on from 9, 18 ...) I don't know where you get nine digits; the first three standards specified 18. The 2002 standard is what increased it to 31, and the 2008 draft increases this to 34 in support of the two IEEE 754r floating-point formats, which as it happens each support 34 decimal digits of precision. Note that the draft still only requires implementors to support fixed-point (including integer) literals of 31 digits or shorter. The numeric portion of the names associated with the FLOAT-BINARY-n and FLOAT-DECIMAL-n USAGEs are related to their decimal capacity and, again, represent formats in IEEE 754r wherein they are defined. I wasn't particularly happy with this choice of names, but wanted to avoid characterizations like "short", "medium" and "long" because as is implicit in your question what was "long" yesterday might be "short" tomorrow. > Seems like there is still no facility for interaction with > the environment ie. > ACCEPT FROM ENVIRONMENT or some such equivalent > along with DISPLAY UPON ENVIRONMENT/SET ENVIRONMENT > (or equivalents). Or did I miss something ? The draft says "The execution of a device format ACCEPT statement causes information from a device to be transferred to the specific data item, where the device is a hardware or software device in the operating environment.". Given the deliberate vagueness in this wording -- that whatever you ACCEPT from is something that the implementor has defined in the operating environment that is capable of providing information -- I'm at rather a loss to understand what it is that you expect of it. The standard doesn't care whether the source of that information is a CRT, a PC imitating a CRT, another program (whether simulating a hardware device or not), an ASR33 teletype, a Friden Flexowriter, or a rutabaga. What part of the "ENVIRONMENT" are you expecting to receive data from, send data to, or "set"? -Chuck Stevens
Post Follow-up to this message"Chuck Stevens" <charles.stevens@unisys.com> wrote in message news:e4vf9v$2kvc$1@si05.rsvl.unisys.com... > "Roger While" <simrw@sim-basis.de> wrote in message > news:e4uekq$jnf$01$1@news.t-online.com... > \ <snip> > > The draft says "The execution of a device format ACCEPT statement causes > information from a device to be transferred to the specific data item, whe re > the device is a hardware or software device in the operating environment." . > Given the deliberate vagueness in this wording -- that whatever you ACCEPT > from is something that the implementor has defined in the operating > environment that is capable of providing information -- I'm at rather a lo ss > to understand what it is that you expect of it. > <snip> > -Chuck Stevens Roger, Chuck doesn't come from an X/Open -type COBOL environment, so he didn't understand your question. Your real question was "how do you get and set run-time environment variables". (The X/Open syntax has always been "conforming" - but only portable to SOME implementations and environments). I know that there have been discussions about this at both J4 and WG4 (i.e. adding a "standard syntax" for doing this) - along with a function (or something) to get the number of arguments passed to a program/function. I agree that I don't see this in the draft '08 Standard. Once he understands the question, Chuck might be able to tell us whether this is still on the "candidates" list - or has been rejected (and if so why). -- Bill Klein wmklein <at> ix.netcom.com
Post Follow-up to this message"Roger While" <simrw@sim-basis.de> wrote in message news:e4uekq$jnf$01$1@news.t-online.com... [snip] > Seems like there is still no facility for interaction with > the environment ie. > ACCEPT FROM ENVIRONMENT or some such equivalent > along with DISPLAY UPON ENVIRONMENT/SET ENVIRONMENT > (or equivalents). Or did I miss something ? Mr While, what you seemed to have missed is that the draft COBOL standard was not written specifically for POSIX; but the draft COBOL standard does permit an implementor to interface to POSIX. As I understand the current draft COBOL standard and with reference to WD 1.6: Page 215, 12.2.6.1 SPECIAL-NAMES paragraph, GF, "device-name-1 IS mnemonic-name-3". Page 217, 12.2.6.2 SPECIAL-NAMES paragraph, SR 7, "Mnemonic-name-3 may be specified only in the ACCEPT and DISPLAY statements. The implementor may specify additional restrictions on the use of mnemonic-names that reference specific device-names." Page 217, 12.2.6.2 SPECIAL-NAMES paragraph, SR 8, "The implementor shall specify the names that are available for switch-name-1, feature-name-1, and device-name-1." The implementor specifies device-names and how to use them. The programmer associates the device-name (system-name) to a mnemonic-name (user-defined word) in the SPECIAL-NAMES paragraph. Thus an implementor could define the following: POSIX-ARGUMENT-COUNT POSIX-ARGUMENT-NUMBER POSIX-ARGUMENT-VALUE POSIX-ENVIRONMENT-NAME POSIX-ENVIRONMENT-VALUE POSIX-SYSERR The programmer may then use these device-names in the SPECIAL-NAMES paragraph to access the "device". SPECIAL-NAMES. POSIX-ARGUMENT-COUNT IS ARGUMENT-COUNT POSIX-ARGUMENT-NUMBER IS ARGUMENT-NUMBER POSIX ARGUMENT-VALUE IS ARGUMENT-VALUE POSIX-ENVIRONMENT-NAME IS ENVIRONMENT-NAME POSIX-ENVIRONMENT-VALUE IS ENVIRONMENT-VALUE POSIX-SYSERR IS SYSERR. Then in the PROCEDURE DIVISION. ACCEPT MY-ARGUMENT-COUNT FROM ARGUMENT-COUNT. DISPLAY ZERO UPON ARGUMENT-NUMBER. ACCEPT THIS-PROGRAM-NAME FROM ARGUMENT-VALUE. DISPLAY "data_directory" UPON ENVIRONMENT-NAME. ACCEPT DATA-DIRECTORY FROM ENVIRONMENT-VALUE. DISPLAY "Program Error: " PROGRAM-ERROR-NUMBER UPON SYSERR. Having used only some of the X/Open (POSIX) features and only rarely, this is my best guess as to what is may look like in a conforming implementation.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.