× 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.



Charlie- There is nothing built in that is equivilent to *LIBL. But,
you can get pretty close.

For starters, in your source where you have the line:
GetHtmlIfs('/compcgi/dev/cgihtml/CGI_SKU411a.html');

Change the line to:
GetHtmlIfs(htmlpath + 'CGI_SKU411a.html');

The htmlpath variable will need to have its value read in at runtime
from an external location. You could read in the value from a data
area in the libl list, or from a message file or from a data file.
Then in your dev. environment the data area would hold the value
"/compcgi/dev/cgihtml/".  In your QA environment the data area would
hold the value "/compcgi/qa/cgihtml/".

How many HTML files do you have? Using the approach I've suggested
above, you'll need to have a full set of the HTML files in
"/compcgi/dev/cgihtml/" and "/compcgi/qa/cgihtml/

If you want a more robust approach where the CGI program uses a set of
paths and searches each folder until it finds the file it wants,
you'll need to code this yourself. I wrote a service program that did
that exact thing at a previous employer. It was extremely helpful. The
service program was called from every CGI program when it was time to
send HTML to the browser.

-Sarah




On 2/20/07, Charlie Ramsdale <Charlie_Ramsdale@xxxxxxxxxxx> wrote:

Ok.. I'll see if I can make the picture a little clearer.

We built a product inquiry screen (intranet only). Screen1 prompts for
SKU and store.  Screen2 displays the image, basic info, qty on hand,
current promotions, rebates and finance offers for the SKU.  Each promo,
rebate and finance description is a link to other screens to view more
details about that promo, rebate, finance offer.
The legacy code for each screen/page has a separate ile/free pgm that
creates the html code line by line (I didn't create this, I inherited
it)
We're converting this into CGI based code where the ile/free code exists
in qrpglesrc and the html src is in the root file system as a .html
file. (compiled objects are in DEVLIB and/or QALIB and/or PRODLIB)
When loading the html page with data we're using the following code:
  GetHtmlIfs('/compcgi/dev/cgihtml/CGI_SKU411a.html');
     UpdHTMLvar('STRno':STRno);
     UpdHTMLvar('out_strname':out_strname);
     UpdHTMLvar('out_sku':out_sku);
     UpdHTMLvar('out_skudesc':out_skudesc);
     UpdHTMLvar('out_qoh':out_qoh);
     UpdHTMLvar('out_price':out_price);
     WrtSection('Page1');

The 'dev' in the path name will be replaced with 'QA' or 'prod'
depending on which environment it was called from.  Normally there
should only be a copy of the .html file in dev if we're doing current
work on it, or a separate copy in qa if they are currently testing
changes we've made.  If neither is the case, then the only copy of that
.html file should be in production.. but I'm running this page from DEV
to test another page in the stream and so my path is defaulting to DEV
and it crashes because it doesn't look for and find the copy in PROD.
If this were a normal 'CALL' command, the system would look for the
program in the libraries listed in your library list - but we don't have
that built in ability in this case.

So I'm looking for a way to work with this situation.  Do I have to keep
a copy of every object in every environment so it will only have to look
in the current directory? Should I search for an object through multiple
paths in a predetermined order and use the path of the first copy I
find?

Help!



-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Matt.Haas@xxxxxxxxxxx
Sent: Tuesday, February 20, 2007 8:44 AM
To: web400@xxxxxxxxxxxx
Subject: Re: [WEB400] Library list for IFS folders?

Charlie,

The root file system (which is what most people incorrectly call the
IFS, the IFS includes all file systems. QSYS is an example of a file
system to library lists do apply) does not have a library list. Having a
little more information about how you are using the stuff in the root
file system will help with getting suggestions.

Matt

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Charlie Ramsdale
Sent: Monday, February 19, 2007 12:27 PM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] Library list for IFS folders?

We have one system that shares 3 environments - dev, QA and production,
each with its own copy of data files and possibly different versions of
programs depending on active dev and testing (we use Turnover to
promote). Accessing the correct copy or the production copy of a program
or file is easy with the library list.  When a user runs a pgm he'll hit
the dev or qa version (depending on liblist), if there is no dev or qa
version, then it will eventually find the production version.  Now we're
adding CGI development with the HTML code in the IFS folders and we've
abruptly discovered that we know of no 'library list' functionality with
objects in the IFS folders.  We obviously don't want to hard code paths
and maintaining a soft version of paths to all objects for the 3
environments seems ludicrous.  Is there a 'library list' style access
for IFS folders that we're not aware of or maybe some other method that
we as noobies need to be aware of before we go too far in our current
development?



Charlie



PS: We do have separate browser paths for the 3 environments so we know
which environ the user is running the program(s) from, but that limits
access to objects in that environment and it will not find an object in
the production environ when needed (unless the path is provided).

--
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 thread ...

Replies:

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.