What happens if BITS = 32 or 64? Could that happen? In that case, neither of
First two cases would hit, RESULT would still be a 32 or 64.

George

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Mike Hulls
Sent: Wednesday, March 12, 2014 9:21 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Command to show what kind of file in Universe - 32 or 64 bit?

I generalized this so it can be used in a recall statement. To implement, I
created a I-desc subroutine that is called from a I-desc in a dictionary
that I can deliver (in my case SYS.DICT).
For example:
SORT VOC WITH F1 = "Q]""F]" AND @ID = "[PDA]" 32.64BIT USING DICT SYS.DICT

The interesting line in the I-Desc 32.64BIT is:
SUBR("DICT.VOC.FILE.32.64BIT","","","")

The code 
SUBROUTINE DICT.VOC.FILE.32.64BIT(RESULT,RV3,RV2,RV1)
* Returns 32 or 64 bit size for a file 
**************************************************
* MAINLINE
**************************************************
    RESULT = ""
        IF @RECORD<1>[1,1] = "F" OR @RECORD<1>[1,1] = "Q" THEN
                OPEN "", @ID TO TEST.FILE THEN 
                  STATUS MV.STATUS FROM TEST.FILE THEN 
                         BITS = MV.STATUS<32> 
                         BEGIN CASE 
                                 CASE BITS EQ 3 
                                         RESULT = "32" 
                                 CASE BITS EQ 5 
                                         RESULT = "64" 
                                 CASE 1 
                                          RESULT = BITS
                          END CASE 
                        END  ;*  STATUS 
                END      ;*  OPEN 
        END
RETURN



--
View this message in context: 
http://u2-universe-unidata.1073795.n5.nabble.com/Command-to-show-what-kind-of-file-in-Universe-32-or-64-bit-tp39581p42841.html
Sent from the U2 - Users mailing list archive at Nabble.com.
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to