|
Michael Hill wrote: > > Hi Richard, > > Can you tell me if the following is possible: > > * Read an AS/400 file (whether it be by RPG program or SQL embedded in > Net.Data to retrieve Product Code, Product Description, and Quantity on > Hand) > * Display it on the screen (Like an AS/400 subfile) > * Allow them to change say Quantity on Hand > * Update the AS/400 Database via either a program or SQL > > This all has to be done using HTML and Net.Data. > > I have no problem doing this in RPG, but HTML is a different story. don't know how to do it with net.data, but I can give you an idea of how to do it using rpg. Are you using IBMs webserver or I/nets? the api's are different for each but work similarly. I do as little html as possible - weve got guys who do that for me, but using rpg virtually requires that you store the html on the 400 in a file that can be read by the pgm. the trick is to read and write the html to the browser using the api's, inserting the as/400 data where applicable. the first program would be called from the browser from a page with the selection criteria. that program would do a "get form variable" for each of those fields entered at the browser. that program would output the next page, inserting the "subfile" lines, which would look something like the following, where xxxxxx is the item number, yyyyyy is the description and zzzzz is the qty. <tr> <td>Item</td> <td>Description</td> <td>Quantity</td> <tr> <td>xxxxxxxx</td> <td>yyyyyyyy</td> <td><input type=text name="xxxxxxx" value="zzzzzzz"></td> </tr> <tr> <td>xxxxxxxx</td> <td>yyyyyyyy</td> <td><input type=text name="xxxxxxx" value="zzzzzzz"></td> </tr> there would be a "submit button" on the page that would initiate a "post" method to the next cgi-bin program, which would have to read the item file in the same way as the prev program, so it would know which items (form variable names) were on the page and "get" the form variables one at a time. you "Get" the form variable by "name" which in this case is the item number. you then have to ensure they entered valid numeric data (html is poor at this), and then use the data to update your file. clear as mud? Once you do it once, the programs just get cloned and it becomes pretty much busy work, with mostly just tweeking the output html (which to me is frustrating, working with seu as an editor). Be sure your html is clean and strait, and that you understand where the "replacement" points and "repeating" points are before you transfer to the 400. Don't use a web page development tool (such as hot metal or front page) if you can help it. while it makes good looking pages, it produces some really ugly html which is very hard to manipulate using seu. hth, rather than just confuse the issue. regards, rick +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.