|
Paul,
Assuming that you really want to know if all of the characters in your
string are numeric and not the RPG definition of TESTN (see manual for
details),
IF %Check( '0123456789': StringToCheck ) = 0 ;
// All numeric - do stuff
ELSE ;
// Run error routine
ENDIF ;
Of course the digits string can be defined as a constant in the D specs,
etc.
-mark
Original Message:
-----------------
From: Paul Morgan pmorgan@xxxxxxxxxxxxxx
Date: Tue, 5 Apr 2005 14:56:28 -0400
To: rpg400-l@xxxxxxxxxxxx
Subject: Free Format TESTN?
A question just came up at our shop about the free format replacement for
TESTN. Should we code a function to replace this opcode? Is there some
comparable API? Should we just monitor for a RPG error when using the
field? What is your solution and what is IBM's recommended solution?
Paul
--
Paul Morgan
Senior Programmer Analyst - Retail
J. Jill Group
100 Birch Pond Drive, PO Box 2009
Tilton, NH 03276-2009
Phone: (603) 266-2117
Fax: (603) 266-2333
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.