Are you saying that you have 3 input fields on the web page.
You want to take them and combined them into one long field in the CGI
Is that right?

Then, yes, use + in EVAL to do that.  eval ssn = SSN1+SSN2+SSN3

Of course you'd have to do the appropriate edit check before this to
insure they have the right number of digits.


> -------- Original Message --------
> Subject: [WEB400] Combining numeric values
> From: "D.W." <dpalme@xxxxxxxxxxx>
> Date: Sat, October 08, 2005 3:36 pm
> To: "Web Enabling the AS400 / iSeries" <web400@xxxxxxxxxxxx>
> One of our physical files has a field that is used for holding SSN data,
> 9 characters in length with no decimals.
> With cgi, we are parsing the data into three separate variables to
> ensure the length is correct and contains only numeric values..IE: SS1 3
> characters in length, SS2 2 characters in length and SS3 4 characters in
> length.
> Where I am stumped is attempting to combine these into a fourth so that
> if I have 123-45-6789 as a SSN it will come in via the browser as
> SS1=123, SS2=45, SS3=6789 I can turn it into 123456789.
> I thought about defining the variables as character type and then
> concatenate them with an EVAL statement and then just write it to the
> PF...anyone have any issues with this?  Any suggestions would be
> appreciated.
> Douglas
> -- 
> This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
> To post a message email: WEB400@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit:
> or email: WEB400-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by 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].