Skip to main content
Joe Torre
New Participant
Aug 11, 2021 2:19 PM UTC

'filepeek' documentation

Hello all,

I am looking for the documentation on 'filepeek'.

I want to do:

EXECUTE "SH -c "filepeek /path/to/file/name"

But the command 'filepeek' requires a 'Q' to quit from the prompt 'Addr:'.

I am wondering if there is a flag that I can use so that is terminates itself without the necessity of going into 'Addr:'

I am just trying to get the info on the file to see if it is 32 or 64 bit.

------------------------------
Joe Torre
Sr DBA Admin
Optum
Westerville OH United States
------------------------------

    9 replies

    Neil Morris
    Rocketeer
    Aug 11, 2021 3:15 PM UTC
    Hello all,

    I am looking for the documentation on 'filepeek'.

    I want to do:

    EXECUTE "SH -c "filepeek /path/to/file/name"

    But the command 'filepeek' requires a 'Q' to quit from the prompt 'Addr:'.

    I am wondering if there is a flag that I can use so that is terminates itself without the necessity of going into 'Addr:'

    I am just trying to get the info on the file to see if it is 32 or 64 bit.

    ------------------------------
    Joe Torre
    Sr DBA Admin
    Optum
    Westerville OH United States
    ------------------------------
    Hi Joe,
    I would consider just using a DATA statement to pass in the 'Q' input value. You could create a Paragraph or just use the DATA statement in a BASIC program. A couple of examples follow:

    >CT VOC JOE

    JOE
    0001 PA
    0002 SH -c "filepeek VOC"
    0003 DATA Q
    >JOE
    filepeek status:
    Active file .......... "VOC"
    Current file address . 0x00000000
    Maximum file address . 0x00047FFF
    Window size .......... 512 bytes
    0xFF will display as . "ÿ"
    Default base ......... 16
    Default mode ......... 32-bit
    File type ............ 3
    Modulo ............... 23
    Separation ........... 4
    Group 0 .............. 0x00000800
    Free head ............ 0x0003F800
    Mkdbstamp ............ 1350909565

    Addr: Q
    >CT BP JOE

    JOE
    0001 DATA "Q"
    0002 EXECUTE "SH -c 'filepeek VOC'"
    >RUN BP JOE
    filepeek status:
    Active file .......... "VOC"
    Current file address . 0x00000000
    Maximum file address . 0x00047FFF
    Window size .......... 512 bytes
    0xFF will display as . "ÿ"
    Default base ......... 16
    Default mode ......... 32-bit
    File type ............ 3
    Modulo ............... 23
    Separation ........... 4
    Group 0 .............. 0x00000800
    Free head ............ 0x0003F800
    Mkdbstamp ............ 1350909565

    Addr: Q
    >

    Thanks,

    Neil

    ------------------------------
    Neil Morris
    Universe Advanced Technical Support
    Rocket Software
    ------------------------------
    Joe Torre
    Joe TorreAuthor
    New Participant
    Aug 11, 2021 3:31 PM UTC
    Hi Joe,
    I would consider just using a DATA statement to pass in the 'Q' input value. You could create a Paragraph or just use the DATA statement in a BASIC program. A couple of examples follow:

    >CT VOC JOE

    JOE
    0001 PA
    0002 SH -c "filepeek VOC"
    0003 DATA Q
    >JOE
    filepeek status:
    Active file .......... "VOC"
    Current file address . 0x00000000
    Maximum file address . 0x00047FFF
    Window size .......... 512 bytes
    0xFF will display as . "ÿ"
    Default base ......... 16
    Default mode ......... 32-bit
    File type ............ 3
    Modulo ............... 23
    Separation ........... 4
    Group 0 .............. 0x00000800
    Free head ............ 0x0003F800
    Mkdbstamp ............ 1350909565

    Addr: Q
    >CT BP JOE

    JOE
    0001 DATA "Q"
    0002 EXECUTE "SH -c 'filepeek VOC'"
    >RUN BP JOE
    filepeek status:
    Active file .......... "VOC"
    Current file address . 0x00000000
    Maximum file address . 0x00047FFF
    Window size .......... 512 bytes
    0xFF will display as . "ÿ"
    Default base ......... 16
    Default mode ......... 32-bit
    File type ............ 3
    Modulo ............... 23
    Separation ........... 4
    Group 0 .............. 0x00000800
    Free head ............ 0x0003F800
    Mkdbstamp ............ 1350909565

    Addr: Q
    >

    Thanks,

    Neil

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

    Yeah, that was the way it was suggested to do it.

    I am just curious about the 'filepeek' command itself.

    Are there any flags that I could invoke to shorten / terminate the output?

    Thanks and best regards,

    Joe Torre | OptumRx
    OptumRx Strategic Business
    Sr Data Engineer | Information Technology
    Workers' Compensation and Auto No-fault
    T (614) 212-8211

    All things change. Change is the essential process of all existence.

    This e-mail, including attachments, may include confidential and/or
    proprietary information, and may be used only by the person or entity
    to which it is addressed. If the reader of this e-mail is not the intended
    recipient or his or her authorized agent, the reader is hereby notified
    that any dissemination, distribution or copying of this e-mail is
    prohibited. If you have received this e-mail in error, please notify the
    sender by replying to this message and delete this e-mail immediately.
    Neil Morris
    Rocketeer
    Aug 11, 2021 4:45 PM UTC
    Hi Neil,

    Yeah, that was the way it was suggested to do it.

    I am just curious about the 'filepeek' command itself.

    Are there any flags that I could invoke to shorten / terminate the output?

    Thanks and best regards,

    Joe Torre | OptumRx
    OptumRx Strategic Business
    Sr Data Engineer | Information Technology
    Workers' Compensation and Auto No-fault
    T (614) 212-8211

    All things change. Change is the essential process of all existence.

    This e-mail, including attachments, may include confidential and/or
    proprietary information, and may be used only by the person or entity
    to which it is addressed. If the reader of this e-mail is not the intended
    recipient or his or her authorized agent, the reader is hereby notified
    that any dissemination, distribution or copying of this e-mail is
    prohibited. If you have received this e-mail in error, please notify the
    sender by replying to this message and delete this e-mail immediately.
    Hi Joe,
    The tool has always been an internal support tool without any command line options to shorten/terminate the command once invoked.
    The expectation is that someone looking at the screen will determine when to exit.
    At this point, the DATA statement is the best option to provide input to the command interface.
    Thank you.
    Neil

    ------------------------------
    Neil Morris
    Universe Advanced Technical Support
    Rocket Software
    ------------------------------
    Manu Fernandes
    Inspiring
    Aug 12, 2021 2:08 AM UTC
    Hello all,

    I am looking for the documentation on 'filepeek'.

    I want to do:

    EXECUTE "SH -c "filepeek /path/to/file/name"

    But the command 'filepeek' requires a 'Q' to quit from the prompt 'Addr:'.

    I am wondering if there is a flag that I can use so that is terminates itself without the necessity of going into 'Addr:'

    I am just trying to get the info on the file to see if it is 32 or 64 bit.

    ------------------------------
    Joe Torre
    Sr DBA Admin
    Optum
    Westerville OH United States
    ------------------------------
    Hi Joe,

    If you want to check a uvfile 32 or 64bit you can do it :
    From BASIC : check attached UV_32OR64BIT file
    From unix : via magic definition and 'file filename' commande, attached the Magix definition to install into unix 
    From winPowershell : see script attached IsUVDataFile.ps1

    i hope this help

    ------------------------------
    Manu Fernandes
    ------------------------------
    Manu Fernandes
    Inspiring
    Aug 12, 2021 2:11 AM UTC
    Hello all,

    I am looking for the documentation on 'filepeek'.

    I want to do:

    EXECUTE "SH -c "filepeek /path/to/file/name"

    But the command 'filepeek' requires a 'Q' to quit from the prompt 'Addr:'.

    I am wondering if there is a flag that I can use so that is terminates itself without the necessity of going into 'Addr:'

    I am just trying to get the info on the file to see if it is 32 or 64 bit.

    ------------------------------
    Joe Torre
    Sr DBA Admin
    Optum
    Westerville OH United States
    ------------------------------
    the powershell script as txt
    the basic as txt

    ------------------------------
    Manu Fernandes
    ------------------------------
    New Participant
    Aug 12, 2021 11:11 AM UTC
    Hello all,

    I am looking for the documentation on 'filepeek'.

    I want to do:

    EXECUTE "SH -c "filepeek /path/to/file/name"

    But the command 'filepeek' requires a 'Q' to quit from the prompt 'Addr:'.

    I am wondering if there is a flag that I can use so that is terminates itself without the necessity of going into 'Addr:'

    I am just trying to get the info on the file to see if it is 32 or 64 bit.

    ------------------------------
    Joe Torre
    Sr DBA Admin
    Optum
    Westerville OH United States
    ------------------------------
    We wrote a BASIC program to capture file information.  Below is a snippet.  You pass in the file name either as an argument or a manual input and it displays the device, inode, file type, modulo, seperation, and 64-bit switch.  We are a Windows shop so I don't know if it will be the same on unix.

    GET(ARG.) ID ELSE
       PRINT 'ENTER FILE NAME: ': ; INPUT ID
    END
    WRK = ID[1,4]
    IF WRK = 'DICT' THEN FNM = ID[6,99] ELSE WRK = ''; FNM = ID
    OPEN WRK, FNM TO NEW.FILE ELSE
       PRINT "CANNOT OPEN ":ID
       STOP
    END
    STATUS MOD FROM NEW.FILE ELSE
    END
    FTYPE = MOD<21>
    SEP = MOD<23>
    MODULO = MOD<22>
    IF MOD<31>[1,6] = 'ACEF02' AND MOD<32> = '5' THEN
       FLAG.64 = 'Y'
    END ELSE
       FLAG.64 = 'N'
    END
    PRINT 'INODE: ':MOD<10>
    PRINT 'DEVICE: ':MOD<11>
    PRINT 'TYPE: ':FTYPE
    PRINT 'MODULO: ':MODULO
    PRINT 'SEP: ':SEP
    PRINT '64-BIT: ':FLAG.64
    STOP
    END

    ------------------------------
    Dara Dickson Fetsch
    Programmer
    Petrodata Business Systems Inc
    Arlington TX United States
    ------------------------------
    Bill Brutzman
    Participating Frequently
    Aug 12, 2021 12:46 PM UTC
    We wrote a BASIC program to capture file information.  Below is a snippet.  You pass in the file name either as an argument or a manual input and it displays the device, inode, file type, modulo, seperation, and 64-bit switch.  We are a Windows shop so I don't know if it will be the same on unix.

    GET(ARG.) ID ELSE
       PRINT 'ENTER FILE NAME: ': ; INPUT ID
    END
    WRK = ID[1,4]
    IF WRK = 'DICT' THEN FNM = ID[6,99] ELSE WRK = ''; FNM = ID
    OPEN WRK, FNM TO NEW.FILE ELSE
       PRINT "CANNOT OPEN ":ID
       STOP
    END
    STATUS MOD FROM NEW.FILE ELSE
    END
    FTYPE = MOD<21>
    SEP = MOD<23>
    MODULO = MOD<22>
    IF MOD<31>[1,6] = 'ACEF02' AND MOD<32> = '5' THEN
       FLAG.64 = 'Y'
    END ELSE
       FLAG.64 = 'N'
    END
    PRINT 'INODE: ':MOD<10>
    PRINT 'DEVICE: ':MOD<11>
    PRINT 'TYPE: ':FTYPE
    PRINT 'MODULO: ':MODULO
    PRINT 'SEP: ':SEP
    PRINT '64-BIT: ':FLAG.64
    STOP
    END

    ------------------------------
    Dara Dickson Fetsch
    Programmer
    Petrodata Business Systems Inc
    Arlington TX United States
    ------------------------------
    The given code runs mostly ok on our UniVerse _ via HP-Ux Itanium.   Surf's up!

    >BASIC BP FILECHECK
    Compiling: Source = '/u2/SOFTWARE/BP/FILECHECK', Object = '/u2/SOFTWARE/BP.O/FILECHECK'
    ****

    Compilation Complete.
    >RUN BP FILECHECK
    ENTER FILE NAME: ?BP
    INODE: 7547
    DEVICE: 1073741833
    TYPE: 19
    MODULO:
    SEP:
    64-BIT: N
    >

    ------------------------------
    Bill Brutzman
    IT Manager
    Hk Metalcraft Manufacturing Corporation
    Lodi NJ United States
    ------------------------------
    Roger Harvey
    New Participant
    Aug 13, 2021 8:58 AM UTC
    Hello all,

    I am looking for the documentation on 'filepeek'.

    I want to do:

    EXECUTE "SH -c "filepeek /path/to/file/name"

    But the command 'filepeek' requires a 'Q' to quit from the prompt 'Addr:'.

    I am wondering if there is a flag that I can use so that is terminates itself without the necessity of going into 'Addr:'

    I am just trying to get the info on the file to see if it is 32 or 64 bit.

    ------------------------------
    Joe Torre
    Sr DBA Admin
    Optum
    Westerville OH United States
    ------------------------------
    Heres another way to skin the cat ;

    EXECUTE "SH -c "timeout 1 filepeek /path/to/file/name"

    Roger Harvey, UK.

    ------------------------------
    Roger Harvey
    Snr Software Engineer
    Rocket Forum Shared Account
    ------------------------------
    Mark Baldridge
    Participating Frequently
    Aug 16, 2021 11:57 AM UTC
    Heres another way to skin the cat ;

    EXECUTE "SH -c "timeout 1 filepeek /path/to/file/name"

    Roger Harvey, UK.

    ------------------------------
    Roger Harvey
    Snr Software Engineer
    Rocket Forum Shared Account
    ------------------------------
    A little less violent, and does not require up to one second of delay:

    sh -c "echo Q | filepeek VOC"
    filepeek status:
    Active file .......... "VOC"
    Current file address . 0x00000000
    Maximum file address . 0x0001B7FF
    Window size .......... 512 bytes
    0xFF will display as . "�"
    Default base ......... 16
    Default mode ......... 32-bit
    File type ............ 3
    Modulo ............... 31
    Separation ........... 4
    Group 0 .............. 0x00000800
    Free head ............ 0x00000000
    Mkdbstamp ............ 1519832698

    Addr: Q
    >

    ------------------------------
    Mark A Baldridge
    Principal Consultant
    Thought Mirror, LLC
    Nacogdoches, Texas United States
    ------------------------------