Code Comments
Programming Forum and web based access to our favorite programming groups.Pete Dashwood wrote: > (snip) > I started with COBOL 61 as well :-) You forgot to mention that, prior to t he > introduction of PICTURE, data was defined with SIZE, CLASS, and *USAGE* > clauses. > I'm just a newbie with COBOL. I've only been programming in it since 1978. But I'm very curious as to what data definitions would have looked like in COBOL 61 without PICTURE clauses. Could anyone provide me with some examples of how various kinds of data items would have been defined with SIZE, CLASS, and USAGE clauses? I realize it's unlikely anyone will go back to the old way, but it just seems interesting to see where we've come from. With kindest regards, -- http://arnold.trembley.home.att.net/
Post Follow-up to this message"Arnold Trembley" <arnold.trembley@worldnet.att.net> wrote in message news:d2fnj.173198$MJ6.117779@bgtnsc05-news.ops.worldnet.att.net... > Pete Dashwood wrote: > > I'm just a newbie with COBOL. I've only been programming in it since 1978. > But I'm very curious as to what data definitions would have looked like in > COBOL 61 without PICTURE clauses. Could anyone provide me with some > examples of how various kinds of data items would have been defined with > SIZE, CLASS, and USAGE clauses? Sure, here are some examples, with their "PICTURE" equivalents... 01 field PIC X(12). 01 field CLASS ALPHANUMERIC, SIZE 12, USAGE DISPLAY. 01 number PIC S9(5). 01 number CLASS SIGNED NUMERIC, SIZE 5, USAGE DISPLAY. 01 binaryNumber PIC S9(4) COMP. 01 binaryNumber CLASS SIGNED NUMERIC, SIZE 4, USAGE COMPUTATIONAL. ... and so on. You can see why PICTURE caught on pretty quickly... :-) Pete. -- "I used to write COBOL...now I can do anything."
Post Follow-up to this message
"Pete Dashwood" <dashwood@removethis.enternet.co.nz> schrieb im Newsbeitrag
news:605lv6F1po926U1@mid.individual.net...
>
>
> "Arnold Trembley" <arnold.trembley@worldnet.att.net> wrote in message
> news:d2fnj.173198$MJ6.117779@bgtnsc05-news.ops.worldnet.att.net...
>
> Sure, here are some examples, with their "PICTURE" equivalents...
>
> 01 field PIC X(12).
> 01 field CLASS ALPHANUMERIC, SIZE 12, USAGE DISPLAY.
>
> 01 number PIC S9(5).
> 01 number CLASS SIGNED NUMERIC, SIZE 5, USAGE DISPLAY.
>
> 01 binaryNumber PIC S9(4) COMP.
> 01 binaryNumber CLASS SIGNED NUMERIC, SIZE 4, USAGE COMPUTATIONAL.
>
> ... and so on.
>
> You can see why PICTURE caught on pretty quickly... :-)
The specification of COBOL-61 extended shows also some more, especially for
editing:
{ZERO SUPPRESS/CHECK PROTECT/FLOAT DOLLAR SIGN}[LEAVING interger PLACES]
POINT LOCATION IS {LEFT/RIGHT} integer {PLACES/BITS}
RANGE IS lit-1 THRU lit-2
SIZE IS [integer-1 TO] integer-2 {CHARACTERS/DIGITS} [DEPENDING ON
data-name]
and the only one of these which is still available: BLANK WHEN ZERO!
K. Kiesel
Fujitsu Siemens Computers, München
Post Follow-up to this messageOn Mon, 28 Jan 2008 06:58:17 GMT, Arnold Trembley <arnold.trembley@worldnet.att.net> wrote: >I'm just a newbie with COBOL. I've only been programming in it since >1978. But I'm very curious as to what data definitions would have >looked like in COBOL 61 without PICTURE clauses. Could anyone provide >me with some examples of how various kinds of data items would have >been defined with SIZE, CLASS, and USAGE clauses? I only have a decade more experience - but PIC took over very rapidly, I have never seen SIZE.
Post Follow-up to this messageOn Mon, 28 Jan 2008 08:50:14 -0700, Howard Brazee <howard@brazee.net> wrote: > >I only have a decade more experience - but PIC took over very rapidly, >I have never seen SIZE. Actually, that was wrong. We probably have the same amount of experience as I had a hiatus in the USAF after I started my CoBOL career.
Post Follow-up to this messagePete Dashwood wrote: > (snip) > Sure, here are some examples, with their "PICTURE" equivalents... > > 01 field PIC X(12). > 01 field CLASS ALPHANUMERIC, SIZE 12, USAGE DISPLAY. > > 01 number PIC S9(5). > 01 number CLASS SIGNED NUMERIC, SIZE 5, USAGE DISPLAY. > > 01 binaryNumber PIC S9(4) COMP. > 01 binaryNumber CLASS SIGNED NUMERIC, SIZE 4, USAGE COMPUTATIONAL. > > ... and so on. > > You can see why PICTURE caught on pretty quickly... :-) > > Pete. > -- > "I used to write COBOL...now I can do anything." Thanks, Pete! And also thanks to Karl and Howard. -- http://arnold.trembley.home.att.net/
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.