Subject: | |
From: | |
Reply To: | |
Date: | Wed, 4 May 2005 10:57:50 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
You can do a LISTFILE pattern,6 >*tempfile
with hpcicommand, then read the ouput file in the cobol program.
Be aware that there is a bug in listfile such that posix filenames have
a space in front of them. This won't matter in a file equation, but
would matter if you use the file name in FOPEN or ASSIGN USING.
[log in to unmask] wrote:
>Problem:
>
>I have an application on a Windows 2000 server that passes data to me (via
>SAMBA) in a HFS directory on the HP3000 system. Although, maybe not
>important is \Share\Router\Read\yyyymmddhhmmss.
>
>The file name that is put there will be different every time. It will be
>in MMDDYYHHMMSS format.
>
>Every time a transaction on the Windows server is done, I need to grab the
>file in a COBOL program that will do something with it. After I am
>finished with the file, I need to delete it or pick up the next available
>file.
>
>There can be several hundreds of these done within a day so having a
>command file or something constantly searching for the next available file
>is easy but I will constantly be opening and closing the COBOL program to
>process these files which I believe will cause a extreme amount of overhead
>on my HP3000/987 system.
>
>What I would like to do is have a background job running on the HP3000 that
>would wake up and pause say every 30 seconds to find a file, do something
>with it (Beechglen (plug) said copy it and delete?), and delete it. Thing
>is, I’m not sure how I can do that in COBOL as far as detecting the file.
>After I detect it and copy it, I should be good to go as far as the file
>equate is concerned. I just want to copy the detected file, delete it from
>the HSF directory, do something with it, and delete the file.
>
>The reason I am using SAMBA is that it is really neat that you can map an
>area off on the HP3000 system and I can write files to the area (e.g.
>\Share\Router\Send\yyyymmddhhmmss) so they can see my files coming back at
>them.
>
>
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|