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 Picture clause and 'IS'
Am I reading the standard correctly that a PICTURE clause must contain
an IS. I have seen it written both ways in production code. But none of
the standards (>=85 I don't have one from before then) list it as
optional (ie not inside an []).


Report this thread to moderator Post Follow-up to this message
Old Post
Jamesm
02-14-07 11:55 PM


Re: Cobol Picture clause and 'IS'
Hmm, I don't think so.  Since it is not underlined it means that it is
optional.

In 13.16.38.1 of ISO/IEC 1989:2002(E) it states

{ PICTURE / PIC} IS character-string

With only PICTURE and PIC being underlined.

5.1.1 Keywords
Keywords are reserved words or context-sensitive words. They are shown in
uppercase and underlined in general
formats. They are required in order to select the functionality associated
with that keyword, subject to the
conventions specified in 5.1.5, Options, and syntax rules specified for the
general format.

5.1.2 Optional words
Optional words are reserved words or context-sensitive words. They are shown
in uppercase and not underlined
in general formats. They may be written to add clarity when the clause or
phrase in which they are defined is
written in the source unit.

Therefore either PICTURE or PIC is required, but IS is optional.

Frank

---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO  USA
 
Am I reading the standard correctly that a PICTURE clause must contain
an IS. I have seen it written both ways in production code. But none of
the standards (>=85 I don't have one from before then) list it as
optional (ie not inside an []).




Report this thread to moderator Post Follow-up to this message
Old Post
Frank Swarbrick
02-14-07 11:55 PM


Re: Cobol Picture clause and 'IS'
Thank you. I should have read section 5 closer. I made the mistake of
thinking only things inside []'s were optional.


Frank Swarbrick wrote:
> Hmm, I don't think so.  Since it is not underlined it means that it is
> optional.
>
> In 13.16.38.1 of ISO/IEC 1989:2002(E) it states
>
> { PICTURE / PIC} IS character-string
>
> With only PICTURE and PIC being underlined.
>
> 5.1.1 Keywords
> Keywords are reserved words or context-sensitive words. They are shown in
> uppercase and underlined in general
> formats. They are required in order to select the functionality associated
> with that keyword, subject to the
> conventions specified in 5.1.5, Options, and syntax rules specified for th
e
> general format.
>
> 5.1.2 Optional words
> Optional words are reserved words or context-sensitive words. They are sho
wn
> in uppercase and not underlined
> in general formats. They may be written to add clarity when the clause or
> phrase in which they are defined is
> written in the source unit.
>
> Therefore either PICTURE or PIC is required, but IS is optional.
>
> Frank
>
> ---
> Frank Swarbrick
> Senior Developer/Analyst - Mainframe Applications
> FirstBank Data Corporation - Lakewood, CO  USA
> 
> Am I reading the standard correctly that a PICTURE clause must contain
> an IS. I have seen it written both ways in production code. But none of
> the standards (>=85 I don't have one from before then) list it as
> optional (ie not inside an []).
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Jamesm
02-14-07 11:55 PM


Re: Cobol Picture clause and 'IS'
Jamesm wrote:
> Am I reading the standard correctly that a PICTURE clause must contain
> an IS. I have seen it written both ways in production code. But none
> of the standards (>=85 I don't have one from before then) list it as
> optional (ie not inside an []).

In some contexts, it depends on what the definition of "is" is.

In COBOL you can omit the "is'es."



Report this thread to moderator Post Follow-up to this message
Old Post
HeyBub
02-14-07 11:55 PM


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 12:23 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.