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

Re: checking if NUMERIC
On Sun, 27 Jan 2008 13:34:41 +1300, "Pete Dashwood"
<dashwood@removethis.enternet.co.nz> wrote:

>
>
>"Clark F Morris" <cfmpublic@ns.sympatico.ca> wrote in message
> news:5phnp39cnk3nd7vc4nsi2flb4psm9emmco@
4ax.com... 
>
>I started with COBOL 61 as well :-) You forgot to mention that, prior to th
e
>introduction of PICTURE, data was defined with SIZE, CLASS, and *USAGE*
>clauses.

I forgot about USAGE or the RCA 301 compiler didn't have it since
everything was 6 bit characters.
> 
>
>Yep, me too... and it very often was :-)
> 
>
>Well, I did it similarly, ensuring the input record was defined with what
>was required, but then testing each supposedly numeric field in an AN field
.
>If they all passed, it was safe to proceed. My programs did this stuff in a
>VALIDATE-INPUT SECTION. It worked pretty well and I seldom had 0c7 crashes
>caused by bad input (usually it was bad programming... Ah, happy days, when
>we were learning...:-))

I used the numeric descriptions because the results would be different
depending on whether the field could be signed.  The expectations are
different and thus the description of the field as expected is needed.
This would be true even with sign is separate.
> 
>
>Maybe. The problem was that with packed fields as soon as you tried to use
>them, you'd crash with 0c7. It therefore was better to ensure that what you
>stored there was valid...

Actually with the 360 DOS COBOL (or one of its successors) the move
could bomb out because they generated a gratuitous Zero Add Packed for
at least some signed fields and I seem to recall some moves to
unsigned fields generated Zero Add Packed, Or Immediate.
> 
>
>Pete.

Report this thread to moderator Post Follow-up to this message
Old Post
Clark F Morris
01-28-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:04 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.