Why so complex?  The STATUS statement returns, in field 31 iirc, an indicator as to 
whether it's a 32-bit or 64-bit file.

Open filename To filevarable Then
   Status filestuff From filevariable Then
      structure = filestuff<31>
      Print (if structure = 5 then "64-bit" else "32-bit")
   End
End

----- Original Message -----
From: Leroy Dreyfuss <[EMAIL PROTECTED]>
Date: Tue, 18 May 2004 13:12:30 -0600
To: [EMAIL PROTECTED]
Subject: Re: [U2] 64 bit file detection

> Here is a quick and dirty program that should at least give you an idea of
> one way to do it in BASIC.
> 
>  Dict   = ''
>  File   = ''
>  Stats  = ''
>  Get(Arg.,1) File Then
>     If UpCase(File) = 'DICT' Then
>        Dict = UpCase(File)
>        Get(Arg.) File Else
>           Crt 'DICT requires a file name'
>           Stop
>        End
>     End
>  End Else
>     Crt 'Enter file name: ':
>     Input File
>     If File = '' Then Stop
>  End
>  Open Dict,File to F.File
>  On Error
>     Crt 'Fatal error opening file, STATUS() is ':Status()
>     Stop
>  End
>  Else
>     Crt 'Unable to open file, STATUS() is ':Status()
>     Stop
>  End
>  Status Stats From F.File
>  Else
>     Crt 'Unable to stat file, STATUS() is ':Status()
>     Stop
>  End
>  Begin Case
>     Case Stats<21> = 1
>        Crt 'Requested file is type 1'
>     Case Stats<21> = 19
>        Crt 'Requested file is type 19'
>        Stop
>     Case Stats<21> = 27
>        Crt 'Requested file is a distributed file'
>        Stop
>     Case 1
>        If Stats<32> = 5 Then
>           Crt 'File is 64-bit'
>        End Else
>           Crt 'File is 32-bit'
>        End
>  End Case
>  End
> 
> 
> Regards,
> 
> LeRoy F. Dreyfuss
> Advanced Technical Services - U2 Technology Analyst
> IBM U2 Data Management Solutions
> Tel: 303-672-1254          Fax: 303-294-4832
> Mobile: 720-341-4317
> External email:  [EMAIL PROTECTED]
> WWW:  http://www.ibm.com/software/data/u2/support
> 
> www.ibm.com/software/data/u2/support - Open, Query, Update, Search -
> Online!
> 
> 
> 
>              richu
>              <[EMAIL PROTECTED]>
>              Sent by:                                                   To
>              [EMAIL PROTECTED]         "'[EMAIL PROTECTED]'"
>              stserver.u2ug.org         <[EMAIL PROTECTED]>
>                                                                         cc
> 
>              05/18/2004 11:05                                      Subject
>              AM                        [U2] 64 bit file detection
> 
> 
>              Please respond to
>                  u2-users
> 
> 
> 
> 
> 
> 
> Does anyone know of a tool, or have a decent routine that shows (on
> universe 10.1, aix 5.2) whether a file is a 32-bit or 64-bit file?
> 
> 
> 
> Best Regards,
> 
> Richard Unsworth
> 
> Richardson Electronics, Ltd.
> 
> Tel: (630) 208 2428
> 
> Fax: (630) 208 2957
> 
> EML: [EMAIL PROTECTED]
> -------
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.u2ug.org/listinfo/u2-users
> 
> [demime 1.01d removed an attachment of type image/gif which had a name of 
> graycol.gif]
> 
> [demime 1.01d removed an attachment of type image/gif which had a name of 
> pic13864.gif]
> 
> [demime 1.01d removed an attachment of type image/gif which had a name of 
> ecblank.gif]
> -------
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.u2ug.org/listinfo/u2-users

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
-------
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users

Reply via email to