Using Message-files in PH 4GL, help needed...

Pickering, John (NORBORD) PICKERIJ@norbord.com
Wed, 28 Aug 2002 14:08:16 -0400


non-MPE readers can press delete now :-)

Hans-Ole:

I've been writing to MSG files for years with both Quick and Qtp.

In the dictionary the file is defined as organization DIRECT and type MPE.

In Qdesign I use:
>file msgfile designer open semiexclusive append
I really don't know if this is what's required -- I just found a combination
of options that worked and now I copy the file statement from program to
program :-) Because it's "semiexclusive" it can have only one writer at a
time. So I code an explicit "close msgfile" after every put -- no big deal
since all the code around it is pretty much designer stuff anyway. Since
it's a designer file and all the fields are set with let verbs the file is
not opened until just before the put -- no single user has it open for long.
Lot's of fopen's but it works.

In Qtp I use:
>output msgfile add
and
>set file msgfile open semiexclusive append
But since there is no explicit open and close control in Qtp, I add a file
equate to specify the mpe NOLOCK parameter which Qtp seems to respect.

Sorry, but I can't help you much with reading MSG files with PowerHouse
components. I played around for a while MANY years ago trying to get it to
work (version 5.01 I think :-) but never really succeeded. If I remember
correctly, I could never get any PH component to "hang a read" (i.e. wait
for a record when the file was empty) -- I think the standard reaction of
both Quick and Quiz is to simply close the file and terminate.

I do use Quick running in batch to process records written to a MSG file by
STR's Fax/3000 (or whatever dumb name they're calling it now). This works
because Fax/3000 keeps the file open for write until the service is stopped.
But as soon as Fax/3000 closes the MSG file the Quick process stops too.

If only we could set a couple of those foptions on a file that Quick has
open :-)

Hopeful sidebar: Now that the PowerHouse code has been merged across
platforms there should be a bunch of stuff to support VAX mailboxes. Since
these are basically just MSG files with another name, maybe the next mpe
version could more fully support mpe MSG files. But I think we know how
likely Cognos is to enhance the mpe version :-)

Please let the list know if you have more success than I've had.

Regards,
JWP



> -----Original Message-----
> From:	Hans-Ole Kaae, ScanConsult [SMTP:hok@scanconsult.dk]
> Sent:	Wednesday, August 28, 2002 11:17 AM
> To:	powerh-l@lists.swau.edu
> Subject:	Using Message-files in PH 4GL, help needed...
> 
> (HP e3000, MPE/iX 6.5 TurboIMAGE XL, PH 8.19.C4)
> 
> Hi fellow listers,
> 
> We have been using MPE Message Files in an application for years. Until 
> now we have been posting data to these message files, while other apps 
> have been reading the data off the files.
> 
> Now we want to read and write to a Message File in 2 PowerHouse 
> programs. The reading program is supposed to read the records in the 
> Message Files as they are created - and since reading is destructive, 
> the MSG-file gets empty, forcing the program to wait until new data 
> arrives. (Event-controlled).
> 
> The file is declared in the PDL-dict as DIRECT MPE. (Sequential has 
> been tried - but to no avail).
> 
> In Qdesign the file is declared Designer (Open Read Share was added - 
> didn't help).
> 
> I keep getting an "Operation inconsistent with access type" MPE-error 
> in Quick when trying a 'while retrieving <filename> sequential' 
> construct.
> 
> I know I can just copy the data from to MSG-file to a normal flat file -
>  but it would be great to see the nice and well-working MSG-concept at 
> it's best...
> 
> I wonder if PowerHouse in fact has real support for MPE Message Files?
> 
> I really will appreciate any info on the subject - and will be 
> interested in knowing if and how others have seen this work.
> 
> TIA!
> 
> Mange hilsner / With kind regards
> 
> Hans-Ole
> 
> ===========================================================
> E-mail: hok@scanconsult.dk        Cell Phone: +45 4042 5507
> ===========================================================
> ScanConsult IT-Partners ApS         Voice   : +45 8738 7474
> Jegstrupvej 96A                     Fax     : +45 8738 7475
> DK-8361 Hasselager         Support : support@scanconsult.dk
> Denmark                    Sales   :   sales@scanconsult.dk
>                  http://www.scanconsult.dk                
> = ParaSuite :  A Suite of Air Cargo Handling solutions    =
> = ParaSafe  :  A Suite of IT-Security solutions           =
> = Partners  : Hewlett-Packard, Cognos, Microsoft and more =
> 
> 
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe" in message body to
> powerh-l-request@lists.swau.edu
> http://lists.swau.edu/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.