HP3000-L Archives

November 2000, Week 3

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:
"Stigers, Greg [And]" <[log in to unmask]>
Reply To:
Stigers, Greg [And]
Date:
Thu, 16 Nov 2000 15:36:46 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
X-no-Archive:yes
As you have been told, the HP COBOL compiler does not know about hexa
literals, although the example for octal literals is strikingly similar to
the example you posted. And since your code already has these, you are
having problems compiling. So, two questions come to mind. Are using hex
literals a good idea? And, what can you do with this code so it will
compile?

The example you give is just another way to specify two characters, AB. I'm
hard pressed to think of a reason why it is better to specify letters by the
hex values for their ASCII codes rather than as simple literals (although if
this was done for characters, I bet it was done for some numeric values as
well). So, if at all possible, change the code.

And you will have to change this code so that it will compile. Micro Focus
has a tool called Revolve that lets you change code in a code base
throughout the code base, and examine the impact of doing so, so it both
reports what would change and can make the change for you. Or, just about
any tool that will find and replace text should, with care, allow you to
manipulate your code base. Or, you can specify string replacements in your
code with $DEFINE, probably in a copy book that is already common to or can
be added to the programs in this code base, for instance $DEFINE
X"4142"="AB"# or whatever is appropriate for your needs.

Greg Stigers
http://www.cgiusa.com

-----Original Message-----
From: Simona Constantin [mailto:[log in to unmask]]
Sent: Thursday, November 16, 2000 2:23 PM
To: [log in to unmask]
Subject: HP Cobol questions


I have to compile some sources which were written for MF and IBM
compilers with hp cobol compiler but i'm not an experienced cobol
programmer so i need a little bit of help.

The questions are:
1. Does hp cobol compiler know about hexa literals? For example MF
recognize
X"4142" ("AB") .
2. Is it possible to create  copy libraries from  POSIX files (i.e files
edited with vi)? I tried adding such files to a copy library with
COBEDIT.PUB.SYS but when i used copy statement to include modules from
this library in a source code i got tones of compiling errors from this
modules even if everything was ok when i used $INCLUDE .

Thanks!

ATOM RSS1 RSS2