VSII equivalent of NUMVAL function



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

VSII equivalent of NUMVAL function

Postby smellslikeroses » Tue May 29, 2012 7:49 pm

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
smellslikeroses
 
Posts: 12
Joined: Fri Mar 12, 2010 7:34 am
Has thanked: 0 time
Been thanked: 0 time

Re: VSII equivalent of NUMVAL function

Postby dick scherrer » Tue May 29, 2012 9:12 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: VSII equivalent of NUMVAL function

Postby smellslikeroses » Tue May 29, 2012 11:57 pm

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 ?
smellslikeroses
 
Posts: 12
Joined: Fri Mar 12, 2010 7:34 am
Has thanked: 0 time
Been thanked: 0 time

Re: VSII equivalent of NUMVAL function

Postby dick scherrer » Wed May 30, 2012 12:15 am

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
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: VSII equivalent of NUMVAL function

Postby Robert Sample » Wed May 30, 2012 12:42 am

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.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: VSII equivalent of NUMVAL function

Postby smellslikeroses » Wed May 30, 2012 1:21 am

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.
smellslikeroses
 
Posts: 12
Joined: Fri Mar 12, 2010 7:34 am
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post