Forum Navigation
You need to log in to create posts and topics.

Babysteps04

Posted by: bill <bill@...>

Thanks for the responses to Babysteps03. You can’t imagine how many for/next loops I have using I% as the index!!

As I’m getting bolder and bolder with the new tricks you are teaching me, I need to expand beyond the Audittrail and Controlfile files which were based on the application’s URL and the appropriate concatenated file names.

In the past, I often ran instances of a program on different machines, or even in different directories on the same machine. Input and output data files (other than Audittrail and Controlfile) would always be stored in similarly named subfolders within some higher level directory, so that the only difference in pathnames for a given file between instance A and instance B would be the name of that higher level directory.

E.g.

Upper level A/levelE/levelD/levelC/levelB/file12345 was for instance A
and
Upper level B/levelE/levelD/levelC/levelB/file12345 was for instance B

Changing from Instance A’s filename parameters to Instance B’s was simply a matter of inputting the uppermost directory’s name as an input variable upperlevel$ which the program would concatenate with the rest of the file name “/levelE/levelD/levelC/levelB/file12345”. There might often be 10-15 different datafiles accessed during the course of running the program, so this approach saved me having to change that many pathnames in the input controlfile.

The bottom line is that for each of the 10-15 different files a given program used, after the concatenation there was a full pathname present as a Pascal string. How do I get the URL from that, and given the URL, use it to open files in I, O, R, N and A modes?