PSTAT in Comet32


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Robert G Laurin on January 30, 2012 at 12:10:16:

Just discovered (the hard way) that PSTAT does not return expected values in Comet32.

I use the PSTAT in a routine to log changes made by operators. This routine is basically in every maintenance program.

Since Comet does not provide any easy mean to track changes, I rely on the PSTAT to know what was done.

Logic is:

Extract (LUN, Fmt) Key=WhateverKey$
Gosub AuditREAD
..
Allow user to edit fields
..
Write (LUN,FMT) Key=WhateverKey$
Gosub AuditWRITE

Where AuditREAD and AuditWRITE sets ActionFlag$ as 'R' or 'W' and calls AuditFile

AuditFile does:
Input (#,Buffer) ! Save the Last I/O Content
Pstat$ = Sub(PSTAT(PARTITION$),1,34) ! Get 34 bytes of PSTAT (Current Program, Current File, Directory, Terminals - LUN is always ZERO-ZERO)
..
then grab the Date$ and Time$
..
Write (AuditFile,Buffer) KEY=Date$+Time$+ActionFlag$+Pstat$+OperatorID$

Using Comet16, this worked for the last 15 years.

Using Comet32 (compiled 16) I get:
Program(8)+00+WrongFile(8)+BlankExt(3)+BlankMissingDirectory(3)+LastFunc(2)+Garbage(2)+Term$(3)+BlankMissingITerm$(3)

My Audit routines really need the FileName and Directory. The key is not supplied by Comet, but as good practice, it is present in the data. The Audit routine does not know which file it is auditing nor where is the key and how long it is. This is why I use a timestamp and other info

Here's example of real keys:


Comet16:
01301214:26:37.29WCMM 00C1A-ST FST3F32T21T21RGL
Comet32:
01301214:27:43.25WCMM 00S2O-ST 3F. T21 RGL

In Both Cases, the GOSUB AuditWrite is immediately after the Write (C1A,0311)

This was tested using Comet32 2011.454



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]