Re: [U2] Command to show what kind of file in Universe - 32 or 64 bit?

Mike Hulls <[email protected]> Wed, 12 Mar 2014 06:21:03 -0700 (PDT)
Newsgroups gmane.comp.db.u2.general
Message-ID <[email protected]>
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
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users