gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] COBOL variables


From: Brian Tiffin
Subject: Re: [open-cobol-list] COBOL variables
Date: Thu, 13 Aug 2009 19:19:24 -0400
User-agent: KMail/1.9.9

Duke;

We live in an interesting time for OpenCOBOL.  Posts to opencobol.org 
are increasing in technical expertise (while still very very open and 
friendly to those the just need a hand up), there is a very promising 
OpenCOBOL manual in the offing, 
http://www.opencobol.org/modules/newbb/viewtopic.php?topic_id=685&forum=1&post_id=3472#forumpost3472
and (I write it, so I'm biased) a fair boatload of technical examples in the 
OpenCOBOL FAQ at http://opencobol.add1tocobol.com/  along with all the other 
resources that are becoming available for open COBOL and OpenCOBOL.  But to 
be honest, Gary's draft (and personally, very anticipated 1.0) User Manual is 
going to be the ticket to learning OpenCOBOL for people for many a grand 
year ... in my humble opinion.

Cheers,
Brian

On August 12, 2009 11:45:10 am Kevin Monceaux wrote:
> Duke,
>
> On Wed, Aug 12, 2009 at 08:58:51AM -0600, Duke Normandin wrote:
>
> Try something like:
> > OOOO10 ID DIVISION.
> > 000015 PROGRAM-ID. HELLO3.
> > 000020 AUTHOR. Duke Normandin.
> > 000030 DATA DIVISION.
> > 000035 WORKING-STORAGE SECTION.
> > 000040 01 CURRENT-DATE.
> > 000060    05 YY   PIC 9(4).
> > 000070    05 MM   PIC 99.
> > 000080    05 DD   PIC 99.
> > 000150 PROCEDURE DIVISION.
> > 000160 MAIN-PARA.
> > 000170    ACCEPT CURRENT-DATE FROM DATE YYYYMMDD.
> > 000180    DISPLAY 'Hello, Cruel World!'.
> > 000190    DISPLAY 'Today is ' DD '-' MM "-" YY.
> > 000200    STOP RUN.
>
> I changed a variable name to avoid confusion between it and the date
> format.  I tried the above compiled via OpenCOBOL and the output was:
>
> Today is 12-08-2009
>
> In my area, I would change that to:
>
> Today is 08-12-2009
>
> :-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]