HP3000-L Archives

May 2005, 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:
Doug Werth <[log in to unmask]>
Reply To:
Doug Werth <[log in to unmask]>
Date:
Wed, 4 May 2005 11:02:09 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (61 lines)
[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.
>
> Files I am sending back to them should easily be accomplished sending a
> file equate through a call to the CICOMMAND.  I think right now.

Each time the program wakes up I would have it call HPCICOMMAND

  listfile /share/Router/read/@,6   >inputfls

Then open and read the file inputfls for the list of files available to
be processed. Instead of setting file equations you can use dynamic file
names in COBOL. See example at

    http://www.beechglen.com/mpe/technotes/dynamcobol.html

Lastly, have the COBOL program either rename each input file that has
been processed to another directory, or purge it so that you don't
attempt to process any file multiple times.

Doug.
--
Doug Werth [log in to unmask]            Beechglen Development Inc.
Director of Technical Support Services             Cincinnati, Ohio
Voice: (513) 922-0509                           Fax: (513) 347-2834

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2