Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

manually resetting file revision dates

4 views
Skip to first unread message

mabb...@yahoo.ca

unread,
Apr 12, 2006, 8:14:58 PM4/12/06
to
I'm testing a script of mine which is checking some file revision
dates. For proper testing, I need to create files with a few different
dates.

I did some searching through past newsgroup posts, and found some info
on changing the rev. date with some of the freeware apps (DFU) and
someone posted a C program. However, we're running a stock 7.3-1/AXP
install - no freeware, just COBOL installed as an extra (other than
TCP/IP, of course).

Is there any way to do this on my setup without changing the system
time repeatedly?
I'm hesistant to start installing additional things if I don't have to
(agressive SOX auditors, etc).

Thanks,
Glenn

Hoff Hoffman

unread,
Apr 12, 2006, 9:08:54 PM4/12/06
to
mabb...@yahoo.ca wrote:
> I'm testing a script of mine which is checking some file revision
> dates. For proper testing, I need to create files with a few different
> dates.
>
> I did some searching through past newsgroup posts, and found some info
> on changing the rev. date with some of the freeware apps (DFU) and
> someone posted a C program. However, we're running a stock 7.3-1/AXP
> install - no freeware, just COBOL installed as an extra (other than
> TCP/IP, of course).
>
> Is there any way to do this on my setup without changing the system
> time...

http://h18000.www1.hp.com/support/asktima/operating_systems/009189D7-74D47620-1C0069.html
http://h18000.www1.hp.com/support/asktima/operating_systems/00941061-F1C3F300-1C03C5.html

Given your situation, I'd get a test system, and try your testing
there. That keeps the auditors happy, and it allows you easier access
to tools like DFU, and it's also where you can get some compilers and
tools loaded. And it avoids all the fun that arises when the auditors
hear you are changing file dates. But failing that availability, the
above examples are from the support database, and are written in
Macro32, and you have access to that.

Guy Peleg

unread,
Apr 13, 2006, 7:56:43 AM4/13/06
to

<mabb...@yahoo.ca> wrote in message
news:1144887298....@j33g2000cwa.googlegroups.com...

SET FILE has been modified to allow changing all date related
fields, however this is shipping with OpenVMS V8.2

Guy

mabb...@yahoo.ca

unread,
Apr 13, 2006, 3:04:16 PM4/13/06
to
Thanks for the links. However, I can't get the file rev macro to
compile after cutting and pasting from the site. Unfortunately I don't
know anything about this language, so hopefully someone can point me in
the right direction. The errors I'm getting are:

<V>$ mac mod_rev_date.mar

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

shr=nil ;Exclusive access
^
%AMAC-E-DATINCODE, data in code stream
at line number 30 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

fib_descr: .long fib$k_length ;Used as input to ACP
QIO
^
%AMAC-E-DATINCODE, data in code stream
at line number 34 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

fib_descr: .long fib$k_length ;Used as input to ACP
QIO
^
%AMAC-E-DATINCODE, data in code stream
at line number 34 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

.address fib_block
^
%AMAC-E-DATINCODE, data in code stream
at line number 35 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

iosb: .quad 0 ;IO status block for
QIO
^
%AMAC-E-DATINCODE, data in code stream
at line number 38 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

iosb: .quad 0 ;IO status block for
QIO
^
%AMAC-E-DATINCODE, data in code stream
at line number 38 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

attr_list: .word atr$s_revdate ;Revision Date
attribute
^
%AMAC-E-DATINCODE, data in code stream
at line number 44 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

attr_list: .word atr$s_revdate ;Revision Date
attribute
^
%AMAC-E-DATINCODE, data in code stream
at line number 44 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

.word atr$c_revdate
^
%AMAC-E-DATINCODE, data in code stream
at line number 45 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

.address rev_date
^
%AMAC-E-DATINCODE, data in code stream
at line number 46 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

.long 0 ;End of list
^
%AMAC-E-DATINCODE, data in code stream
at line number 47 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

time_buff_desc: .long 80
^
%AMAC-E-DATINCODE, data in code stream
at line number 52 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

time_buff_desc: .long 80
^
%AMAC-E-DATINCODE, data in code stream
at line number 52 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

.address time_buff
^
%AMAC-E-DATINCODE, data in code stream
at line number 53 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

prompt: .ascid /revision time-MONTH MUST BE IN CAPS-dd-MMM-yyyy
hh:mm:ss /
^
%AMAC-E-DATINCODE, data in code stream
at line number 54 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

prompt: .ascid /revision time-MONTH MUST BE IN CAPS-dd-MMM-yyyy
hh:mm:ss /
^
%AMAC-E-DATINCODE, data in code stream
at line number 54 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

prompt: .ascid /revision time-MONTH MUST BE IN CAPS-dd-MMM-yyyy
hh:mm:ss /
^
%AMAC-E-DATINCODE, data in code stream
at line number 54 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

prompt: .ascid /revision time-MONTH MUST BE IN CAPS-dd-MMM-yyyy
hh:mm:ss /
^
%AMAC-E-DATINCODE, data in code stream
at line number 54 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

prompt: .ascid /revision time-MONTH MUST BE IN CAPS-dd-MMM-yyyy
hh:mm:ss /
^
%AMAC-E-DATINCODE, data in code stream
at line number 54 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

$open fab=infab
^
%AMAC-E-DATINCODE, data in code stream
at line number 73 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

$open fab=infab
^
%AMAC-E-STORCODLAB, stored code labels must be declared entry points in
routine
DATE
at line number 73 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

PUSHAL PROMPT
^
%AMAC-E-STORCODLAB, stored code labels must be declared entry points in
routine
DATE
at line number 82 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

PUSHAL TIME_BUFF_DESC
^
%AMAC-E-STORCODLAB, stored code labels must be declared entry points in
routine
DATE
at line number 83 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

TIMADR = DATE
^
%AMAC-E-STORCODLAB, stored code labels must be declared entry points in
routine
DATE
at line number 87 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

p5=#attr_list
^
%AMAC-E-STORCODLAB, stored code labels must be declared entry points in
routine
DATE
at line number 97 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

p5=#attr_list
^
%AMAC-E-STORCODLAB, stored code labels must be declared entry points in
routine
DATE
at line number 97 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

movq date, rev_date
^
%AMAC-E-SELFMODCOD, self-modifying code in routine DATE
at line number 89 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

movw infab+fab$l_stv, in_chan
^
%AMAC-E-SELFMODCOD, self-modifying code in routine DATE
at line number 78 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

date: .blkq 1 ;Binary date = 7-Dec-1958
^
%AMAC-I-BRANCHBET, branch between routines from routine DATE
at line number 55 in file KCM:[USERS.IS.GLENNM]MOD_REV_DATE.MAR;1

.end begin
^
%AMAC-E-PREVERROR, previous errors prevent further analysis
at line number 102


Thanks!

mabb...@yahoo.ca

unread,
Apr 13, 2006, 3:04:15 PM4/13/06
to

David J. Dachtera

unread,
Apr 13, 2006, 11:08:47 PM4/13/06
to

I sure hope it leaves an Audit (Server) trail...

--
David J Dachtera
dba DJE Systems
http://www.djesys.com/

Unofficial OpenVMS Marketing Home Page
http://www.djesys.com/vms/market/

Unofficial Affordable OpenVMS Home Page:
http://www.djesys.com/vms/soho/

Unofficial OpenVMS-IA32 Home Page:
http://www.djesys.com/vms/ia32/

Unofficial OpenVMS Hobbyist Support Page:
http://www.djesys.com/vms/support/

John Reagan

unread,
Apr 14, 2006, 10:47:31 AM4/14/06
to
mabb...@yahoo.ca wrote:
> Thanks for the links. However, I can't get the file rev macro to
> compile after cutting and pasting from the site. Unfortunately I don't
> know anything about this language, so hopefully someone can point me in
> the right direction. The errors I'm getting are:

That is Macro-32 from VAX. The code needs a few tweaks to get it to
compile on Alpha and I64. Email me the .MAR file (if it needs any
.MLBs, ZIP'em to me as well so I can test compile it) and I'll add the
needed directives.

--
John Reagan
HP Pascal/{A|I}MACRO for OpenVMS Project Leader
Hewlett-Packard Company

Hoff Hoffman

unread,
Apr 14, 2006, 2:50:35 PM4/14/06
to

Add the following two .psect lines shown below into your local copy of
the code, and off you go.

----
...
$fabdef
$fibdef
$atrdef
;
.psect data,noexe,noshr,wrt
;
; File Attributes Block
...
----
...
;
.psect code,nowrt,shr,exe
;
.entry begin,^M<>
;
; open the file
;
...

Hein RMS van den Heuvel

unread,
Apr 15, 2006, 12:12:03 PM4/15/06
to
That example is not Alpha compliant, and uses the more efficient, but
much more tricky to understand QIO call to modify file attributes. It
also fails to test the return status on the time conversion... a
relatively likely troouble spot.

Here is a variant, based on that example, which just uses RMS calls.
It works for me. Like the original it expects the filename to operate
on point to by a logical name "filename"

Enjoy...
Hein.

$ type rdt.mar
.psect data,wrt,noexe
$fabdef
$xabrdtdef

infab: $fab fnm=<filename>,- ;Filename is a logical
fac=<get,put>,- ;File access modes
xab=xabrdt

xabrdt: $xabrdt

time_buff: .blkb 80
time_buff_desc: .long 80
.address time_buff

prompt: .ascid /revision time-MONTH MUST BE IN CAPS-dd-MMM-yyyy
hh:mm:ss /

.psect code,nowrt,exe


.entry begin,^M<>
;
; open the file
;

$open fab=infab
blbc r0, done
;
; move desired date into revision date field
;
PUSHAL PROMPT
PUSHAL TIME_BUFF_DESC
CALLS #2,G^LIB$GET_INPUT

$BINTIM_S TIMBUF = TIME_BUFF_DESC,-
TIMADR = xabrdt+xab$l_rdt0
blbc r0, done
;
; close the file, modify revision date on the deaccess
;
$close fab=infab
done: ret ; Return with final status in r0
.end begin

Hein RMS van den Heuvel

unread,
Apr 15, 2006, 1:24:05 PM4/15/06
to
I already had RDT examples in Fortran, C and Pascal, but for grins I
just made one in Cobol.
It is a litte rough in that it hardcode's RMS structures.
Notably a manually layout of an XABRDT instead of some library include,
and a hard coded 36 for FAB$L_XAB (from $FABDEF in
SYS$LIBRARY:STARLET.MLB)
And, for the example, both filename and new data/time are hard coded.
Still, it should show the principle...

Hein


IDENTIFICATION DIVISION.
PROGRAM-ID. rdt_test.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT TEST_FILE
ASSIGN TO TEST_NAME
FILE STATUS IS FILE_STATUS.

DATA DIVISION.
FILE SECTION.
FD TEST_FILE.
01 TEST_RECORD.
03 SOME-DATA PIC X(80).

WORKING-STORAGE SECTION.

01 FILE_STATUS PIC X(02) VALUE " ".
01 FAB_PT POINTER.
01 XABRDT_PT POINTER.
01 FAB_XAB POINTER.

01 XABRDT_REC.
05 XABRDT_BLN_COD PIC S9(9) COMP VALUE 5150.
05 NXT USAGE IS POINTER.
05 RVN PIC 9(9) COMP.
05 RDT PIC 9(18) COMP.

01 NEW_TIME PIC X(23) VALUE "01-APR-2001 01:23:45.67".

PROCEDURE DIVISION.

MY_MAIN SECTION.
MAIN.

OPEN I-O TEST_FILE.
IF FILE_STATUS = "00" THEN
CALL "DCOB$RMS_CURRENT_FAB" GIVING FAB_PT
ELSE
DISPLAY "ERROR: TEST FILE OPEN ERROR, STATUS: ", FILE_STATUS
STOP RUN
END-IF.

CALL "SYS$BINTIM" USING BY DESCRIPTOR NEW_TIME, BY REFERENCE RDT.

ADD 36 TO FAB_PT GIVING FAB_XAB.
SET XABRDT_PT TO REFERENCE OF XABRDT_REC.
CALL "OTS$MOVE3" USING BY VALUE 4,
BY REFERENCE XABRDT_PT,
BY VALUE FAB_XAB.

CLOSE TEST_FILE.
STOP RUN.

f...@bar.com

unread,
Apr 21, 2006, 11:22:23 AM4/21/06
to


Speaking as a SOX IT auditor (for a Big 4) and as Hoff has pointed out
( assuming you are subject to SOX section 404), if I found that you
were changing dates and doing non-production testing on a system that
supported your financial reporting systems, that would probably result
in a finding of at least "significant deficiency" in Internal Controls
Over Financial Reporting (ICOFR), which requires reporting to the
Audit Committee, if not a material weakness which requires reporting
in the annual report.

If you are not a publicly traded company but still have external
auditors, the Big 4 are now using a modified SOX audit which now
delves much more deeply into the IT infrastructure, specifically
change control, sdlc and access controls.

If you are referring to an Internal Audit, discovery of this would
probably result in a risk rating of "high" or "very high", resulting
in this specific item being reported to the Audit Committee. In my
clients this kind of stuff causes heads to roll.

Soo......
1) Do this stuff on a test system, not a production system.
2) Ensure that any work that MUST be done on a production is solidly
backed up by Change Control records and audit trail records showing
before state, actions taken and after state.
------------------------------------------
NO, use John Mee3 at comcast dot net (remove the spaces and do the
obvious with the "dot" and the "at"

0 new messages