Re: 4GL Help files
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Jobs, Consulting & Announcements
My only thought is that you can make application specific help files by naming them the same as the application name, with different suffixes. Thus if you have application named "a.4ge", its help file should be "a.iem", and "b.4ge" would have "b.iem". You can use arg_val(0) to get the name of the application. Running c-compiles, the full application name is given (a.4ge), so you have to strip off path/names and the .4ge suffix. Running in RDS, arg_val(0) of a.4gi returns only "a", so no stripping required. Now, have some code like: helpfilename = arg_val(0) string helpfilename as required helpfilename = helpfilename clipped, ".iem" options help file helpfilename This assumes that options help file can use variables, which I think it can, but am unable to test it right now. -- ======================================================= Dennis J. Pimple Informix Software, Inc. Principal Consultant 6300 S Syracuse Way Ste 205 dennisp@informix.com Englewood CO 80111 office: 303-850-0210 direct: 303-740-5611 Opinions expressed are mine, fax: 303-779-4025 and do not necessarily reflect those of my employer. http://www.informix.com Tony Flaherty <aef@mfs.misys.co.uk> wrote in message news:954253301.8576.0.nnrp-02.c1ed1f69@news.demon.co.uk... > > Hi, > > I4GL 7.20.UD8 > > Is it possible to define "local" help files? > > I have a module containing a function for which I want to create a help > file, easy enough. However, this module can be compiled into several > different programs each of which has its own help file. Now once my new > function is called, the help file changes globally and the calling programs > help commands now read the wrong file. > > I can issue a new OPTIONS HELP FILE after calling the function, but this is > a poor solution. Any suggestions? Is there something blindingly obvious > I'm missing here! > > -- > --------------------------------------- > Tony Flaherty aef@mfs.misys.co.uk > Analyst Programmer > Misys Financial Systems > All statements and opinions are my own, > Misys don't pay me enough to have opinions > on their behalf > > . >
Mmm, I'm not sure this solves the problem, Consider the following pseudo code . . OPTION HELP FILE "helpfile1" . . CALL SHOWHELP(help_tag) . . CALL a_func_in_another_module() . . CALL SHOWHELP(help_tag) . . If a_func_in_another_module() has . OPTION HELP FILE "helpfile2" . . Then the 2nd call to showhelp() above will read helpfile2 not helpfile1. Another options help file command needs to be executed after the function has returned in order to reset whatever internal mechanism is used to point back at helpfile1 Jonathan Leffler (sp) replied with a solution which used a stack of help file names and functions to push and pop it. Which seems to me to be as unwieldy as having the extra options help file commands in the code after the function calls. -- --------------------------------------- Tony Flaherty aef@mfs.misys.co.uk Analyst Programmer Misys Financial Systems All statements and opinions are my own, Misys don't pay me enough to have opinions on their behalf . Dennis Pimple wrote in message <8caln0$r351@webint.na.informix.com>... >My only thought is that you can make application specific help files by >naming them the same as the application name, with different suffixes. Thus >if you have application named "a.4ge", its help file should be "a.iem", and >"b.4ge" would have "b.iem". You can use arg_val(0) to get the name of the >application. Running c-compiles, the full application name is given (a.4ge), >so you have to strip off path/names and the .4ge suffix. Running in RDS, >arg_val(0) of a.4gi returns only "a", so no stripping required. > >Now, have some code like: >helpfilename = arg_val(0) >string helpfilename as required >helpfilename = helpfilename clipped, ".iem" >options help file helpfilename > >This assumes that options help file can use variables, which I think it can, >but am unable to test it right now. > > >-- >======================================================= >Dennis J. Pimple Informix Software, Inc. >Principal Consultant 6300 S Syracuse Way Ste 205 >dennisp@informix.com Englewood CO 80111 >office: 303-850-0210 >direct: 303-740-5611 Opinions expressed are mine, > fax: 303-779-4025 and do not necessarily > reflect those of my employer. > >http://www.informix.com > >Tony Flaherty <aef@mfs.misys.co.uk> wrote in message >news:954253301.8576.0.nnrp-02.c1ed1f69@news.demon.co.uk... >> >> Hi, >> >> I4GL 7.20.UD8 >> >> Is it possible to define "local" help files? >> >> I have a module containing a function for which I want to create a help >> file, easy enough. However, this module can be compiled into several >> different programs each of which has its own help file. Now once my new >> function is called, the help file changes globally and the calling >programs >> help commands now read the wrong file. >> >> I can issue a new OPTIONS HELP FILE after calling the function, but this >is >> a poor solution. Any suggestions? Is there something blindingly obvious >> I'm missing here! >> >> -- >> --------------------------------------- >> Tony Flaherty aef@mfs.misys.co.uk >> Analyst Programmer >> Misys Financial Systems >> All statements and opinions are my own, >> Misys don't pay me enough to have opinions >> on their behalf >> >> . >> > >