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

COBOL 61 Data Definitions [was Re: checking if NUMERIC]
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/

Report this thread to moderator Post Follow-up to this message
Old Post
Arnold Trembley
01-28-08 08:55 AM


Re: COBOL 61 Data Definitions [was Re: checking if NUMERIC]

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



Report this thread to moderator Post Follow-up to this message
Old Post
Pete Dashwood
01-28-08 08:55 AM


Re: COBOL 61 Data Definitions [was Re: checking if NUMERIC]
"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



Report this thread to moderator Post Follow-up to this message
Old Post
Karl Kiesel
01-28-08 11:56 PM


Re: COBOL 61 Data Definitions [was Re: checking if NUMERIC]
On 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.

Report this thread to moderator Post Follow-up to this message
Old Post
Howard Brazee
01-28-08 11:56 PM


Re: COBOL 61 Data Definitions [was Re: checking if NUMERIC]
On 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.

Report this thread to moderator Post Follow-up to this message
Old Post
Howard Brazee
01-28-08 11:56 PM


Re: COBOL 61 Data Definitions [was Re: checking if NUMERIC]
Pete 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/

Report this thread to moderator Post Follow-up to this message
Old Post
Arnold Trembley
01-30-08 02:57 AM


Sponsored Links




Last Thread Next Thread Next
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 03:57 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.