× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



How did you get the resulting Item number?  I didn't see any
code for your call to CvtDB.  Or are you parsing the query
string data yourself?

One other thing that may make this easier is using the
QzhbCGIParse API.  I've got an ILE wrapper at my site that
works slick.  So you'd just say:

ItemNum = #CGIParse('-value item')

And ItemNum would then contain the value of the field "item"
from your web page (it is case sensitive).

Then there's no need to mess with QtmhGetEnv and QtmhCvtDB
(QtmhCvtDB being tricky until you get used to it).

Feel free to contact me personally as well for help.  And if
you haven't, check out my book on the subject, e-RPG, at
http://www.bvstools.com/erpg.html

The 2nd book is coming out soon!  A ton of more information,
examples, etc!

Brad
www.bvstools.com

On Fri, 30 Nov 2001 15:41:44 -0500
 Peter_Vidal@pall.com wrote:
> Hello guys!
>
> I am starting to practice this concept and here is my
> first "rookie" problem.  I
> just want to enter a part number(15 characters long) as a
> parameter to an HTML
> page and display the description and other general
> information.
>
> My API to pull the string looks like this:
>  *
>  * QtmhGetEnv
>  * API that the program will use to retrieve the query
> string
> DGetEnvData       PR
> ExtProc('QtmhGetEnv')
> D  Data                               Like(EnvData)
> D  AvailLen                     10I 0 Const
> D  ReturnedLen                  10I 0
> D  EnvName                      30A   Const
> D  EnvNameLen                   10I 0 Const
> D  Error                              Like(APIError)
>
> ... and in my calculations:
> C                   CallP     GetEnvData(EnvData :
> %Len(EnvData) :
> C                             EnvDataLen : QueryString :
> C                             %Len(QueryString) :
> APIError )
>
> However, when I enter a valid part number (let's say
> 1303022) my results on the
> page are blank and check the API variables:
>
> EnvData:ITEM=13030200
> EnvDataLen:12
> QueryString:QUERY_STRING
> APIError:?
> Resulting Item Number:3030200
>
> As you see, the first character (1) is gone and there is
> an extra zero at the
> end,
> when the real item is 1303022 (parameter that you still
> see on the address bar
> on the browser.  Due to the fact that this item is not in
> database, the page is
> blank.
>
> I do not know if I have provided enough information but I
> hope somebody is able
> to throw some light here.
>
> TIA
>
> Peter Vidal
> Programmer Analyst
> PALL Aeropower Corp.
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries
> (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/rpg400-l.
>

Bradley V. Stone
BVS.Tools
www.bvstools.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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