This is the program from an old tech note is our knowledge base which determines the 32/64 Bit information you may find it useful
*************************************************************************
*
*
* Program to verify file bit setting 32/64 bit
*
* This program will allow you to verify the bit setting for a file ie 32bit or 64bit
* it also returns other information such as the size in bytes, the type, the modulo
* and separation. It could be modified to return any all information returned by
* the STATUS statement used in basic.
*
* It also supports the use of a select list but will not handle a multi level you will
* have to specify the individual part files in order to verify them.
* In order to preserve the look and feel of UniVerse it prompts for file names
* in the same fashion as the editor and uses the same form of error message
* when a file is not in the VOC
*
* To use it just copy this source into a BP file and compile and catalog globally
*
* Module %M% Version %I% Date %H%
*
*************************************************************************
*
** Initialise Variables
*
GOSUB INIT.VAR
*
** Check for presence of select list if not prompt
*
IF NOT(SYSTEM(11)) THEN
FVAR = TRIM(@SENTENCE[4,999])
IF FVAR = '' THEN
GOSUB INP.FVAR
IF FVAR # '' THEN
GOSUB PARSENT
GOSUB HANDLEALL
LOOP
WHILE OPEN.FILE.ERROR DO
GOSUB INP.FVAR
IF FVAR # '' THEN
GOSUB PARSENT
GOSUB HANDLEALL
END ELSE OPEN.FILE.ERROR = 0
REPEAT
END
END ELSE
GOSUB PARSENT
GOSUB HANDLEALL
LOOP
WHILE OPEN.FILE.ERROR DO
GOSUB INP.FVAR
IF FVAR # '' THEN
GOSUB PARSENT
GOSUB HANDLEALL
END ELSE OPEN.FILE.ERROR = 0
REPEAT
END
END ELSE
IF INDEX(@SENTENCE,'ALL',1) THEN ALL = 1 ELSE
IF INDEX(@SENTENCE,'DICT',1) THEN FDICT = 'DICT' ELSE FDICT = ''
END
LOOP
READNEXT FVAR ELSE EOF = 1
UNTIL EOF DO GOSUB HANDLEALL
REPEAT
END
*
** Exit Program
*
STOP
*
HANDLEALL:** Handle All
*
IF ALL THEN
FDICT = 'DICT'
GOSUB OPEN.FILE
FDICT = ''
GOSUB OPEN.FILE
END ELSE GOSUB OPEN.FILE
*
RETURN
*
OPEN.FILE:** Open file and get status
*
OPEN FDICT,FVAR TO FILE THEN
STATUS RECORD FROM FILE THEN
OPEN.FILE.ERROR = 0
BITSET = ''
FILESIZE = OCONV(RECORD<6>,'MR,')
FILETYPE = RECORD<21>
FILEMOD = RECORD<22>
FILESEP = RECORD<23>
BIT = RECORD<31>
BEGIN CASE
CASE FILETYPE = 1 OR FILETYPE = 19
GOSUB DIR.FOUND
CASE BIT[5,2] = 01
BITSET = 32
GOSUB PL
CASE BIT[5,2] = 02
BITSET = 64
GOSUB PL
CASE 1
BITSET = 'Unknown'
END CASE
END
END ELSE
OPEN.FILE.ERROR = 1
IF FDICT = 'DICT' THEN TEXT = 'Unable to open "DICT,' ELSE
TEXT = 'Unable to open "'
END
DISPLAY TEXT:FVAR:TAIL
IF SYSTEM(11) THEN
IF ALL THEN IF FDICT = '' THEN DISPLAY
END
END
*
RETURN
*
PL:** Print Line
*
IF FDICT = 'DICT' THEN TEXT = 'File Name DICT ' ELSE
TEXT = 'File Name '
END
*
DISPLAY TEXT:FVAR:' File type ':FILETYPE:
DISPLAY ' Modulo ':FILEMOD:' Separation ':FILESEP
DISPLAY 'Size ':FILESIZE:' Bytes is ':BITSET:' Bit'
IF SYSTEM(11) THEN
IF ALL THEN
IF FDICT = '' THEN DISPLAY
END ELSE DISPLAY
END
*
RETURN
*
DIR.FOUND:** Print Directory Found
*
DISPLAY 'File Name ':FVAR:' is a directory file, type ':FILETYPE
IF SYSTEM(11) THEN DISPLAY
*
RETURN
*
PARSENT:** Parse Sentence
*
ALL = 0
IF INDEX(FVAR,'ALL',1) THEN ALL = 1
CONVERT SPACE(1) TO @VM IN FVAR
IF FVAR<1,1> = 'DATA' OR FVAR<1,1> = 'DICT' THEN
FDICT = FVAR<1,1>
FVAR = FVAR<1,2>
IF FDICT = 'DATA' THEN FDICT = ''
END ELSE FVAR = FVAR<1,1>
*
RETURN
*
INP.FVAR:** INPUT FILE NAME
*
DISPLAY 'File Name = ':
INPUT FVAR
*
RETURN
*
INIT.VAR:** Initialise variables
*
PROMPT ''
FVAR = ''
FDICT = ''
ALL = 0
EOF = 0
OPEN.FILE.ERROR = 0
TAIL = '", not a file in VOC.'
*
RETURN
*
END
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
Original Message:
Sent: 01-25-2023 18:01
From: Mark Baldridge
Subject: In Universe 11.2.3 can we tell if a file is 64bit
Note that with NLS, the substring operator [] will not match 'ACEF02' to the first six CHARACTERS, NOT BYTES of the binary file header's magic number. Use BYTEVAL instead to examine a byte, such as the hex digit 0xAC or 0xEF, and even the 0x02. Byte order of the host system will also affect the sequence of the bytes.
If you want something that works on any system, locating the positions of the 0xac and 0xef of the magic number will identify the byte order, and then you can find the 32/64 bit byte. Or you could locate the 0x01 or 0x02 in the "magic number" which can reside in only one of two of the first 4 bytes in current systems.
------------------------------
Mark A Baldridge
Principal Consultant
Thought Mirror
Nacogdoches, Texas United States
Original Message:
Sent: 01-24-2023 18:07
From: John Jenkins
Subject: In Universe 11.2.3 can we tell if a file is 64bit
I recommend creating a virtual dictionary item based upon the BASIC code as a model. That way you can LIST and SELECT based upon 32/64 bit files if needed.
Regards
JJ
------------------------------
John Jenkins
Thame, Oxfordshire
Original Message:
Sent: 08-10-2022 11:40
From: Dara Dickson Fetsch
Subject: In Universe 11.2.3 can we tell if a file is 64bit
We wrote a program where we pass in the filename as an argument and use the STATUS command to extract information. Here's a snippet of how to get the 64-bit info:
STATUS MOD FROM NEW.FILE ELSE
END
IF MOD<31>[1,6] = 'ACEF02' AND MOD<32> = '5' THEN
FLAG.64 = 'Y'
END ELSE
FLAG.64 = 'N'
END
------------------------------
Dara Dickson Fetsch
Programmer
Petrodata Business Systems Inc
Arlington TX US
Original Message:
Sent: 08-09-2022 13:14
From: neil richards
Subject: In Universe 11.2.3 can we tell if a file is 64bit
How can we quickly see if a file (or list of files) are 64bit or 32bit
I can see from analyze.file that a file is 64bit. but that was not picked up by the ACCOUNT.FILE.STATS in the STAT.FILE
Is there an hidden key in FILEINFO() that will get that information
------------------------------
neil richards
dba
Rocket Forum Shared Account
lake Elsinore CA US
------------------------------