Rocket U2 | UniVerse & UniData

 View Only
  • 1.  In Universe 11.2.3 can we tell if a file is 64bit

    Posted 08-09-2022 13:40
    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
    ------------------------------


  • 2.  RE: In Universe 11.2.3 can we tell if a file is 64bit
    Best Answer

    ROCKETEER
    Posted 08-09-2022 14:11
    Fields 31 and 32 of the dynamic array returned by the BASIC STATUS statement contain information on the style of the file. An example below using field 32.

    >COPYP BP FILETYPE (TSN

    FILETYPE
    OPEN "32BIT.FILE" TO F.FILE1 ELSE STOP 'CANNOT OPEN 32BIT.FILE'
    OPEN "64BIT.FILE" TO F.FILE2 ELSE STOP 'CANNOT OPEN 64BIT.FILE'
    STATUS FILE1 FROM F.FILE1 ELSE STOP
    STATUS FILE2 FROM F.FILE2 ELSE STOP
    CRT FILE1<32>
    CRT FILE2<32>
    END
    >RUN BP FILETYPE
    3
    5

    ------------------------------
    Neil Morris
    Universe Advanced Technical Support
    Rocket Software
    ------------------------------



  • 3.  RE: In Universe 11.2.3 can we tell if a file is 64bit

    Posted 08-10-2022 11:40
    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
    ------------------------------



  • 4.  RE: In Universe 11.2.3 can we tell if a file is 64bit

    Posted 08-16-2022 11:21

    If you're using UNIX/Linux then you could configure the /etc/magic file (or rather take a copy of /etc/magic, modify and use the copy)

    file -m /etc/magic.uv *
    UV-FILE1: UV 32BIT Type:18 Mod:11 Sep:2
    UV-FILE2: UV 64BIT Type:18 Mod:13 Sep:2
    UV-FILE3: UV 32BIT Type:18 Mod:1823 Sep:1
    UV-FILE4: UV 32BIT Type:18 Mod:101 Sep:2
    UV-FILE5: UV 64BIT Type:18 Mod:11 Sep:1
    UV-FILE6: UV 32BIT Type:18 Mod:29 Sep:4
    VOC: UV 32BIT Type:18 Mod:1831 Sep:2
    VOCLIB: UV 32BIT Type:2 Mod:7 Sep:4
    UV-FILE7: UV 32BIT Type:18 Mod:1001 Sep:1
    UV-FILE8: UV 32BIT Type:18 Mod:1001 Sep:1
    UV-FILE9: UV 32BIT Type:18 Mod:101 Sep:1
    UV-FILE10: UV 64BIT Type:18 Mod:101 Sep:2
    UV-FILE11: UV 64BIT Type:18 Mod:101 Sep:2
    UV-FILE12: UV 32BIT  Type:18 Mod:223 Sep:1
    UV-FILE-TRIGGER: UV 32BIT Type:18 Mod:97 Sep:3 Trigger

    Note: this file has been generated to report specific UniVerse file types, you may be running on a different Endian or have other types not correctly identified but should be able to easily adapt.

    Mark



    ------------------------------
    Mark Copp
    Infrastructure Design
    Travis Perkins Trading Company Ltd
    Northampton GB
    ------------------------------



  • 5.  RE: In Universe 11.2.3 can we tell if a file is 64bit

    PARTNER
    Posted 08-16-2022 21:51
    I really like this approach.
    The 2 challenges to implementing it are (1) getting access to the knowledge about the raw file offsets that contain the various settings that identify the full variations of UV file types; (2) understanding how to define the "magic" settings to leverage this info.
    It would be good if UV/UD came with this "out-of-the-box".

    ------------------------------
    Gregor Scott
    Software Architect
    Pentana Solutions Pty Ltd
    Mount Waverley VIC AU
    ------------------------------