HP3000-L Archives

November 2000, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Sohrt, Jeff" <[log in to unmask]>
Reply To:
Sohrt, Jeff
Date:
Mon, 6 Nov 2000 12:39:26 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (48 lines)
Boy we've really shaken the tree on this one.  It's fast becoming an OT.
But we've left out good ol' MPE

:calc $0c
12, $C, %14

and MPEX
%calc $c
12, $C, %14, "...."  (they just happen to give you ascii if it's
non-garbage)


jds

p.s.
I love the "value FORMFEED" example the best.


-----Original Message-----
From: Stigers, Greg [And] [mailto:[log in to unmask]]
Sent: Monday, November 06, 2000 12:15 PM
To: [log in to unmask]
Subject: Re: hexidecimal in cobol


X-no-Archive:yes
If Tracy is right, and you just want the formfeed x0C as a single char at
the beginning of a record (I am curious to know why), I think the ANSI COBOL
way to do this would be as SYMBOLIC CHARACTERS. This will allow you to then
reference any char by a friendly name (choose carefully!), just as we are
used to doing with SPACE, ZERO, etc. The one oddity in this is that ASCII
begins counting at zero, and COBOL begins counting at 1, so you have to
basically add one to the normal ASCII value to get the char you really want.


       SPECIAL-NAMES.
           SYMBOLIC CHARACTERS FORMFEED IS 13

       01  record-desc.
               05  rd-1st-char pic x value FORMFEED.

This may be overkill if this is the one and only place that you will ever
need it in this program, but it does the trick, and is portable to most any
COBOL compiler or platform.

Greg Stigers
http://www.cgiusa.com

ATOM RSS1 RSS2