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



Rod You don't want to do anything hard, do you?  :-)

1. It seems that, once you get the special characters out of the way, most
of the APIs understand anything with a '/' or '\' in postion 1 as absolute.
Does the ap0lGetAttributes() return full path as one of the options? It
_does_ return a file ID, from which the full path is available with
qp0lGetPathFromFileID().

Seems that QShell special attributes would not be needed outside of QShell.
It has the Unix special stuff, IIRC, like quoting with the accent on the
left, apostrophe on the right. So the main specials to worry about are
tilde (for home directory) and 'dot' and 'double-dot'

OTOH, you _can_ put an execution strign on STRQSH, can't you?

Pathname rules are loosely (?) based on Unix characteristics, seems to me.
Does IFS Concepts have the best description of the rules? I'm not sure.

Hope this is a little helpful. Good luck.

Vern

At 09:58 AM 8/16/02 +1000, you wrote:
>Vernon,
>
>I'd best elaborate more
>I guess there are two separate issues really here
>
>1. converting a (potentially) relative path to an absolute path (i.e. from
>root)
>2. converting a path (entered as a command parameter) to a path (relative or
>absolute) that is "acceptable" to the IBM api's that allow a path parameter.
>
>So, in a logical order I would want to perform point 2. then sometimes point
>1. (via 1 or 2 apis preferably)
>
>Currently IBM supports THREE different sets of rules as to what is allowed
>in a path (that I know of).
>
>1. At the command parameter value. Supports such things as '~'(Tilde), '\'
>instead of '/', redundant '/'s , '.' '..' (dot, double dot). e.g.
>'~usrprfname/dir1\\dir2/file.ext' or '../dira//dir2//'  are both valid paths
>and are interpreted as being say '/x/y/z/dir1/dir2/file.ext' and
>'p/dira/dirb'  There are other special meaning characters too.
>
>2. at the IBM api level. Some of the above special meaning chars are either
>not allowed or have a different meaning (e.g. '~'(tilde), '\'(backslash),
>'*'(asterisk) ,'?'(question),''' (apostrophe),'"'(quote)
>
>3. Qshell. Supports many more special meaning chars (e.g. '~+', '~-' to
>mention just some)
>
>What I am trying to do is write an Os400 Command with the same type of
>support that IBM uses (*PName) and then in the CPP use an IFS/Unix Api
>without it potentially breaking on the Path field. If for example I used the
>paths mentioned in point 1 above and just passed them to the IBM api I would
>not get the desired result.
>Now I know I could program an algorithm myself (that not my issue), but its
>not trivial and it would make sense to use what IBM uses. I'm not even
>confident I know all the rules as the documentation is not very clear. I
>also want to future-protect it as much as possible.
>
>The second issue of determining an absolute path becomes much easier if the
>first issue is solved (i.e. if the path is first 'normalised'. Again, if
>there is an easy way of doing it (direct api) why do it the hard way.
>
>hope this clarifies where I'm coming from better.
>
>Rod Orr



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.