Page 1 of 1

VSII equivalent of NUMVAL function

PostPosted: Tue May 29, 2012 7:49 pm
by smellslikeroses
Hi All,
In the past I have often made copious use of intrinsic functions but have moved to a shop that is using VSII cobol. As you know, I cannot compile source with calls to functions like NUMVAL. I really need to find an alternative that will convert a char to a numeric so I can perform arithmetic conditioning. Any thoughts? Thanks.

Example of what I want to do:
IF FUNCTION NUMVAL(WS-STRING) < 100

Re: VSII equivalent of NUMVAL function

PostPosted: Tue May 29, 2012 9:12 pm
by dick scherrer
Hello,

You need to find out if the compiler might be upgraded any time soon.

If it will not, suggest you write your own callable routine to accomplish what you want. Keep in mind when you do this and if the routine is heavily called, the cpu usage will be greater.

Re: VSII equivalent of NUMVAL function

PostPosted: Tue May 29, 2012 11:57 pm
by smellslikeroses
ok, thanks for the reply.
This is a mainframe shop and I've been told that this is 'new' cobol (as opposed to my experience with other versions of cobol).

I'm guessing that record level initializations are also not allowed in VSII ?

Re: VSII equivalent of NUMVAL function

PostPosted: Wed May 30, 2012 12:15 am
by dick scherrer
Hello,

This is a mainframe shop and I've been told that this is 'new' cobol
VS COBOL II might possibly be the oldest IBM mainframe COBOL compiler still "supported" . . . This is "new" compared to what on your system? Suggest you ask around and learn if an Enterprise compiler is also available.

INITIALIZE should work.

The following link is to the VS COBOL II Language Reference:
http://publibz.boulder.ibm.com/cgi-bin/ ... 1/CONTENTS

Re: VSII equivalent of NUMVAL function

PostPosted: Wed May 30, 2012 12:42 am
by Robert Sample
IBM web site http://www-03.ibm.com/systems/z/os/zos/features/lang_environment/history/cobmvs.html lists VS COBOL 1.4.0 -- the LAST one available -- as having been withdrawn from marketing in June 1997 and withdrawn from service March 2001. In other words, your "new" compiler had to have come from IBM more than 11 years ago, and hasn't been actively marketed in 15 years.

If your site won't upgrade to a COBOL compiler more recent you have no choice but to code up the functions you need.

Re: VSII equivalent of NUMVAL function

PostPosted: Wed May 30, 2012 1:21 am
by smellslikeroses
yes, the developer who told me it is new cobol has been here 20 years. I guess you're right, I've no other choice but to regress my coding. thanks.