_chksum.utl Utility - Manage Program Checksums

Syntax

call "_chksum.utl",program_name$,result

call "_chksum.utl",program_name$,result,action
call "_chksum.utl",program_name$,result,0,checksum_date,checksum_time,userid$

Description

The _chksum.utl utility manages program checksums, allowing the user to brand programs. This utility can be used to test a checksum for validity (Syntax 1); update the checksum (Syntax 2); or query the checksum for the most recent modification date, time, and user ID (Syntax 3). The checksum is derived from the program itself, so it can be used to determine if the program has been changed since the checksum was last updated.

Parameter

Description

program_name$

Program to check or brand.

result

Return Code, as follows:

 

>=1 Successful test.

 

0 Failure if CDATE and CTIME are set.

 

1 No checksum was set for this program, if CDATE and CTIME are not set.

action

Set to 1 if the user wants to WRITE a checksum to a program file.

checksum_date

Date of checksum addition, using the JUL() function.

checksum_time

Time of checksum addition, calculated as TIM*3600.

userid$

USERID (INFO(3,2)) of the last person to modify this file. To use this value under MS-DOS, set the environment variable USERID before starting PRO/5.

Examples

The following tests a checksum for validity:

CALL BBEXT$+"_chksum.utl","ORDER",OK

The following tests the checksum, returning the most recent modification date, time, and USERID:

CALL BBEXT$+"_chksum.utl","ORDER",OK,0,CDATE,CTIME,USERID$

The following updates the checksum:

CALL BBEXT$+"_chksum.utl","ORDER",OK,1

See Also

Alphabetical EUS Utilities

Functional Listing of EUS Utilities