|
On Fri, 11 Mar 2005 04:07:18 -0800 (PST), Matchrefree@xxxxxxxxx <matchrefree@xxxxxxxxx> wrote: > Hi > > Is there any possible way there in CL to know if the data in a char field is > completely numeric or not. > > Thanks > Hari Hari, I think a custom written ILE procedure is your best solution here. CL automatically passes the OPDESC info on all the procedure parms, so your char field can be contained in any size CL variable. And once written, you only need one line of CL code to determine if your char variable contains digits only or not. Setting up and using the service program that holds all the procedures called from CL can be kept relatively simple. There are no copy books needed for instance. The service program, called "CL_PROCS" ?, can be standalone, the names of its exported procedures dont have to integrate with your naming convention used in your other, RPG, service programs. So you can use simple, long procedure names. Like "CheckCharIsAllDigits". Using custom written procedures in CL is a two step process: - use the CALLPRC command to call the procedure - on the CRTPGM command, specify the service program in the BNDSRVPGM parm. -Steve
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.