|
Look at you <INPUT> tag in your HTML.
Is the name="LAST" exactly the same as your cgiGetVar('LAST') call?
If not, that's your problem. These names are case sensitive--A common
problem.
-Bob
> -------- Original Message --------
> Subject: RE: [WEB400] Combining numeric values
> From: "D.W." <dpalme@xxxxxxxxxxx>
> Date: Sat, October 08, 2005 10:16 pm
> To: "'Web Enabling the AS400 / iSeries'" <web400@xxxxxxxxxxxx>
>
> This is turning into one of those projects that always takes twice as
> long as it should :)
>
> This is probably more for Bob Cozzi but if anyone else can assist I
> promise to READ EVERY SINGLE post and respond appropriately.
>
> I have setup a very simple webpage that has one input tag called LAST
> (for last name) and by using the GET method I can see it being passed so
> I know this part is working correctly.
>
> My program takes this input via cgiGetVar and assigns it to LAST NAME
> with the following lines of code:
>
> C CALLP cgiinit()
> C EVAL LASTNAME = cgiGetVar('LAST')
>
> I am then attempting to write this to a PF called RECM with the
> following:
>
> C MOVE LASTNAME LNAME
> C WRITE RECM
>
> A blank record is written to the file but nothing in the LNAME
> field...so either I am not getting the data correctly from the web or I
> am missing something else along the way....any suggestions, hints would
> be appreciated.
>
> Douglas
>
>
> -----Original Message-----
> From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
> On Behalf Of cozzi@xxxxxxxxx
> Sent: Saturday, October 08, 2005 5:46 PM
> To: Web Enabling the AS400 / iSeries
> Subject: RE: [WEB400] Combining numeric values
>
>
> Douglas,
>
> 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 program? 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.
>
> -Bob
>
>
> > -------- 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: http://lists.midrange.com/mailman/listinfo/web400
> > or email: WEB400-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/web400.
>
> --
> 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: http://lists.midrange.com/mailman/listinfo/web400
> or email: WEB400-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/web400.
>
>
> --
> 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: http://lists.midrange.com/mailman/listinfo/web400
> or email: WEB400-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/web400.
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.