HP3000-L Archives

October 2000, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Barry Lake <[log in to unmask]>
Reply To:
Barry Lake <[log in to unmask]>
Date:
Sun, 1 Oct 2000 16:07:11 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
At 5:56 PM -0400 10/1/00, John Pollard wrote:
>I am writing a program which will be testing to see if a file is a member
>of a fileset.  To keep it simple, I'm starting with only MPE-syntax
>files/filesets and I am accepting only the "@", "?" and "#" non-file-name
>characters in the fileset (so no ranges of characters).
>
>Is there an existing callable library routine which would make this
>determination?  If not, does anyone have pseudo-code which might guide me?
>The only problem I see at the moment is handling multiple commercial at
>signs (@) in a given portion of a fileset; such as: myfile.a@[log in to unmask]
>
>Just to make it a little trickier, this is a Cobol program, so recursion is
>out for any inline code.



This probably won't help you very much but on the Unix side of things (at
least on HP-UX, where I've used it before) there is the "glob()" function
in the C library. You pass it a string containing your wildcarded file set,
and it returns a pointer to an array of strings containing the filenames of
all the files that matched your file set.

I would be very surprised if the gcc environment, which has been ported to
MPE/iX, did not contain some variant of glob(). If you were to install gcc
on your system, you might be able to call glob() from within COBOL.

There may be information on how you can call C library functions from
within COBOL in the multi-language programming paper on Jazz:

   http://jazz.external.hp.com/papers/lang/pgm_pitfalls.html


Good Luck,

Barry Lake                              [log in to unmask]
Allegro Consultants, Inc.               www.allegro.bogus.com
(408)252-2330
--------
Attempting to use anti-spam technique.
Remove ".bogus" to create valid address.

ATOM RSS1 RSS2