home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / datatl25.zip / DCTDSGN.Z / EWSQDEAU.QRY < prev    next >
Text File  |  1997-09-11  |  2KB  |  78 lines

  1. #NAME#
  2. DA_DataElementAliasUsage
  3. #DESCRIPTION#
  4. The Data Element Alias Usage impact analysis query returns the names of all the objects which directly use a Shareable Data Element Alias.  The data element alias contains the name by which the data element is used in a data structure or DB2 column.  It also contains the names of IMS fields.
  5.  
  6. View type:  DataAtlasDataElementAliasImpact
  7.  
  8. Modifications:
  9. Change the search criteria of the Data Element Alias using the = (equals), IN or LIKE elements in the SQL WHERE clauses.  When the data element alias represents the name of a shareable data element, the format of the alias name is <element>alias<revision:variation>.  When the data element alias represents an IMS field name, the format of the alias name is <DBD.segment>field<revision:variation>.
  10.  
  11. #MODIFIED#
  12.  
  13. #VERSION#
  14.  
  15. #SQL STATEMENT#
  16. SELECT
  17.   a.elementAlias,
  18.   a.dataElement as dataElement,
  19.   'COBOL Data Structure' as relatedType,
  20.   a.cobolDataStructure as relatedObject,
  21.   ' ' as container1,
  22.   ' ' as container2
  23. FROM OUTER
  24.   DataAtlasDataElementAliasImpact a,
  25.   PartView p
  26. WHERE
  27.   a.elementAlias LIKE '<%>%' AND
  28.   (a.cobolDataStructure=p.baseName AND
  29.    p.partType='DSDataStructure')
  30. UNION
  31. SELECT
  32.   a.elementAlias,
  33.   a.dataElement as dataElement,
  34.   'Data Structure' as relatedType,
  35.   a.dataStructure as relatedObject,
  36.   ' ' as container1,
  37.   ' ' as container2
  38. FROM OUTER
  39.   DataAtlasDataElementAliasImpact a,
  40.   PartView p
  41. WHERE
  42.   a.elementAlias LIKE '<%>%' AND
  43.   (a.DataStructure=p.baseName AND
  44.    p.partType='DSDataStructure')
  45. UNION
  46. SELECT
  47.   a.elementAlias,
  48.   a.dataElement as dataElement,
  49.   'IMS Field mapped to Structure' as relatedType,
  50.   a.mappedIMSField as relatedObject,
  51.   a.mappedIMSSegment as container1,
  52.   a.mappedDBD as container2
  53. FROM OUTER
  54.   DataAtlasDataElementAliasImpact a,
  55.   PartView p
  56. WHERE
  57.   a.elementAlias LIKE '<%>%' AND
  58.   (a.mappedDBD=p.baseName AND
  59.    p.partType='DSDBD')
  60. UNION
  61. SELECT
  62.   a.elementAlias,
  63.   '** no data element **' as dataElement,
  64.   'IMS Field' as relatedType,
  65.   a.IMSSegment as relatedObject,
  66.   a.DBD as container1, 
  67.   ' ' as container2
  68. FROM OUTER
  69.   DataAtlasDataElementAliasImpact a,
  70.   PartView p
  71. WHERE
  72.   a.elementAlias LIKE '<%>%' AND
  73.   (a.DBD=p.baseName AND
  74.    p.partType='DSDBD')
  75. ORDER BY
  76.   1,3;
  77.  
  78.