[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

1369.0. "Determining RECORD" by RIVAGE::SILVA (Carl Silva - Telecom Eng - DTN 828-5339) Wed Aug 21 1991 15:26

	I have defined a RECORD type of:

          TYPE UserInfo = 50 RECORD
                  ULTRIX UserID = 1 : Latin1String;
                  Email Address = 2 : Latin1String;
                  FAX Number = 3 : Latin1String;
                  Phone Number = 4 : Latin1String;
          END RECORD;

	and I have several attributes that are this type.  Is there any way to
tell that these several several attributes all have the same RECORD type (such
as the categories field)?  Is there any way I can set up my MSL so that I can
tell that they are all attributes of type UserInfo?  Also, is it possible to
read this definition (UserInfo RECORD definition) from the dictionary?

	Any help would be greatly appreciated!!

	Carl
T.RTitleUserPersonal
Name
DateLines
1369.1Help??TENERE::SILVACarl Silva - Telecom Eng - DTN 828-5339Mon Aug 26 1991 07:544
	It seems that it is not possible to find out the common user defined
type.  Does anyone have any experience with this?

	Carl
1369.2I don't think you can get there from hereTOOK::GUERTINDon't fight fire with flamesMon Aug 26 1991 13:2710
    I'm not sure I understand exactly why you need this functionality, I'm
    not sure that I understand the functionality that you are asking for.
    
    It sounds like you want a relational database query feature for a
    dictionary lookup request (select all Attributes with DataType = UserInfo).
    Unfortunately, this functionality is not available.  The Type code (50)
    is not stored in the dictionary at this time.  I will check if the Type
    name (UserInfo) is stored or not.
    
    -Matt.
1369.3TOOK::GUERTINDon't fight fire with flamesMon Aug 26 1991 13:411
    It doesn't appear that the Type name is stored either.
1369.4It can be done...POLE::LEMMONMon Aug 26 1991 16:2615
    
    You could hack a bit and define a attribute with DISPLAY=FALSE and
    put either the codes or names of the attributes that have the 
    same datatype as a default value.   It is ugly and probably not 
    recommended, but it does keep the relationship in the data dictionary.  
    
    	ATTRUBUTE User Info Recs = 99 : Latin1String
    	    DISPLAY = FALSE,
    	    PREDICTABLE = FALSE,
    	    DEFAULT = "A1, A3, A5"   (* Where A1, A3, and A5 are attribute
    					names *)
    	END ATTRIBUTE User Info Recs;
    
    
    /Jim
1369.5Thanks for the responses!!!!!!TENERE::SILVACarl Silva - Telecom Eng - DTN 828-5339Tue Aug 27 1991 07:0730
	RE: .2,

>    I'm not sure I understand exactly why you need this functionality, I'm
>    not sure that I understand the functionality that you are asking for.

	If I wrote a routine that could encode and decode a user defined data
type, I would like to be able to use it against all attributes that have the
same user defined data type.
    
>    It sounds like you want a relational database query feature for a
>    dictionary lookup request (select all Attributes with DataType = UserInfo).

	Not really.  If the information was stored the way a object was stored,
this would be possible with the current dictionary routines (if they could
return the new data).

>    Unfortunately, this functionality is not available.  The Type code (50)
>    is not stored in the dictionary at this time.  I will check if the Type
>    name (UserInfo) is stored or not.
>    It doesn't appear that the Type name is stored either.

	OK.  8-(

	RE: .4,

	Thanks for the suggestion Jim, this should work.  I just wondered if
there was some feature that I was missing to get this.

	Carl
1369.6no way to find out "type"TOOK::CALLANDERJill Callander DTN 226-5316Tue Aug 27 1991 18:127
    there is no way that I know of to find out the "type" from the
    dictionary. This information is lost in the translation of the
    MSL input file into the DAP input format. At this time we always
    decode the records/sets/sequences... piece by piece.
    
    jill
    
1369.7OK!TENERE::SILVACarl Silva - Telecom Eng - DTN 828-5339Wed Aug 28 1991 10:386
	OK, thanks!

	Does this have the potential for a new feature in the near future?

	Carl
1369.8Yes, it should be available in the "near future"TOOK::GUERTINDon't fight fire with flamesWed Aug 28 1991 11:1511
    We plan to add this with enrollable datatypes.  Certainly supporting
    new "public" datatypes would require this support.  Inheritence within
    the dictionary also would be involved (you ask for dictionary
    information about a datatype for some child entity, and if the datatype
    is not defined at that point, it will look for it at the parent level
    -- this goes for MSL use of datatypes as well).  Unfortunately, the
    only way I can think of supporting this type of functionality would
    have the side effect of slowing down dictionary access some small
    percentage, hence it was traded off for other functionality.
    
    -Matt.