<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting all Data Item queries in SAS Information Map Studio in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/769160#M30835</link>
    <description>&lt;P&gt;In SAS Information Map Studio, select the &lt;STRONG&gt;File&lt;/STRONG&gt; menu and then the &lt;STRONG&gt;Print&lt;/STRONG&gt; option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Madelyn_SAS_0-1632316746037.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63896i64B48269D533C708/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Madelyn_SAS_0-1632316746037.png" alt="Madelyn_SAS_0-1632316746037.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Sep 2021 13:19:24 GMT</pubDate>
    <dc:creator>Madelyn_SAS</dc:creator>
    <dc:date>2021-09-22T13:19:24Z</dc:date>
    <item>
      <title>Getting all Data Item queries in SAS Information Map Studio</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/743370#M29247</link>
      <description>&lt;P&gt;Hey,&lt;BR /&gt;&lt;BR /&gt;My SAS version is 6.6.&lt;BR /&gt;In SAS Information Map Studio (version 4.4_M7), I have an information map with hundreds of data items in it.&lt;/P&gt;&lt;P&gt;Is there any way to get all the queries of these items in one file so I can CTRL+F?&lt;BR /&gt;It seems that the search options in Information Map Studio are quite limited.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eitan&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 13:47:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/743370#M29247</guid>
      <dc:creator>Eitan123</dc:creator>
      <dc:date>2021-05-24T13:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all Data Item queries in SAS Information Map Studio</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/743537#M29255</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/369610"&gt;@Eitan123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your SAS version is likely 9.x, perhaps 9.3, and I assume you're using SAS Web Report Studio and/or other SAS solutions that rely on information maps.&amp;nbsp; Information Maps are simply a business view of data that make it easier to abstract the details of database access from the end user.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might find the INFOMAPS libname engine useful for reporting on data items and filters.&amp;nbsp; See &lt;A href="https://blogs.sas.com/content/sasdummy/2010/05/25/reporting-on-sas-information-maps/" target="_self"&gt;example in this blog post&lt;/A&gt;.&amp;nbsp; Code below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;/* Specify your metadata folder here.  This is the folder that     */
/* contains the information map definitions                        */
%let folder = /Shared Data/Maps;

/* Specify the name of the information map for which you want the  */
/* detailed report.                                                */
%let mapName = Cars;

/* SYSECHO: when this program is run within SAS Enterprise Guide,  */
/* the sysecho statements show more detailed information within    */
/* the task status list.                                           */
sysecho "Assigning library for information map";

/* NOTE: when using this LIBNAME statement in a batch environment,  */
/* you might need to add metadata host and credentials information. */
/* When running from SAS Enterprise Guide, it should not be         */
/* necessary; your metadata identity will be used automatically.    */
/* Note that the report will contain only those Information Maps    */
/* for which you have Read access permissions.                      */
libname imaps infomaps 
  mappath="&amp;amp;folder"
  aggregate=yes
  /* use already-established metadata connection */
  metacredentials=no
  /* uncomment the following if running in batch/DMS */
  /*****************   
  host=metadatahost.com
  port=8561
  user=yourId
  pw="yourPassword"
  ******************/
  PRESERVE_MAP_NAMES=YES;

footnote;
/* Report of information maps in the selected folder */
proc print data=sashelp.vinfomp noobs label;
  var mapname description;
  label mapname = "Name" description = "Description";
  title "Information Maps in &amp;amp;folder";
run;

title;

proc sql noprint;
  sysecho "Discovering information map member name";
  SELECT imap.memname into :_im_memname
    from dictionary.infomaps as imap
      where imap.mapname="%trim(%superq(mapName))";
  sysecho "Gathering information map data items";
  create table ITEMS as 
    SELECT  d.dataitemname, d.name, d.id, d.path, d.description, c.label, d.class, c.type, c.length, c.format, c.informat, c.npos  
      FROM dictionary.dataitems as d, dictionary.columns as c
        WHERE (d.libname=c.libname and d.memname=c.memname and c.name=d.name) 
          and (d.libname ="IMAPS" and d.memname="%trim(%superq(_im_memname))")
          and (d.isusable="YES")
        ORDER BY c.npos;
  sysecho "Gathering information map filters";
  create table FILTERS as 
    SELECT f.filtername, f.name, f.id, f.path, f.description, f.promptusage, f.usagepromptid
      FROM dictionary.filters as f 
        WHERE libname ="IMAPS" and memname="%trim(%superq(_im_memname))";
  sysecho "Gathering information map prompts";
  create table scratch_ALLPROMPTS as 
    SELECT p.id, p.promptname, p.name, p.description, p.type, p.dependentpid, x.order
      FROM dictionary.prompts as p, dictionary.promptsxml as x
        WHERE p.libname ="IMAPS" and p.memname="%trim(%superq(_im_memname))"
          and (p.id = x.id)
          and (p.memname=x.memname)
        ORDER BY p.id, x.order ASC;
  create table PROMPTS as 
    SELECT f.name as filterid, p.id, p.dependentpid, p.promptname, p.name, p.description, p.type, p.order 
      FROM scratch_ALLPROMPTS as p, FILTERS as f
        WHERE (f.usagepromptid = p.id)
          ORDER BY f.name, p.id, p.order ASC;
  create table STPPROMPTS as 
    SELECT p.id, p.promptname, p.name, p.description, p.type, p.order
      FROM scratch_ALLPROMPTS as p FULL JOIN PROMPTS as fp on (p.id = fp.id)
        WHERE fp.id IS MISSING;
  drop table scratch_ALLPROMPTS;
quit;

/* Report on Data items in a single Information Map */
proc report data=items nowd;
  title "Data items in &amp;amp;folder./&amp;amp;mapName";
  column path dataitemname name description class format;
  define path / group 'Path' missing;
  define dataitemname / group 'Display name' missing;
  compute dataitemname;
    if dataitemname ne ' ' then
      hold1=dataitemname;
    if dataitemname eq ' ' then
      dataitemname=hold1;
  endcomp;
  define name / group 'Syntax Name' missing;
  compute name;
    if name ne ' ' then
      hold2=name;
    if name eq ' ' then
      name=hold2;
  endcomp;
  define description / group 'Description' missing;
  compute description;
    if description ne ' ' then
      hold3=description;
    if description eq ' ' then
      description=hold3;
  endcomp;
  define class / group 'Type' missing;
  compute class;
    if class ne ' ' then
      hold4=class;
    if class eq ' ' then
      class=hold4;
  endcomp;
  define format / group 'Format' missing;
  compute format;
    if format ne ' ' then
      hold5=format;
    if format eq ' ' then
      format=hold5;
  endcomp;
run;

quit;

proc report data=filters nowd;
  title "Filters in &amp;amp;folder./&amp;amp;mapName";
  column path filtername name description promptusage;
  define path / group 'Path' missing;
  define filtername / group 'Display name' missing;
  compute filtername;
    if filtername ne ' ' then
      hold2=filtername;
    if filtername eq ' ' then
      filtername=hold2;
  endcomp;
  define name / group 'Syntax name' missing;
  compute name;
    if name ne ' ' then
      hold3=name;
    if name eq ' ' then
      name=hold3;
  endcomp;
  define description / group 'Description' missing;
  compute description;
    if description ne ' ' then
      hold4=description;
    if description eq ' ' then
      description=hold4;
  endcomp;
  define promptusage / group 'Uses prompts?' missing;
  compute promptusage;
    if promptusage ne ' ' then
      hold5=promptusage;
    if promptusage eq ' ' then
      promptusage=hold5;
  endcomp;
run;

quit;

proc print data=stpprompts noobs label;
  title "Stored process prompts in &amp;amp;folder./&amp;amp;mapName";
  var promptname description;
  label promptname="Prompt name" description="Description";
run;

title;

/* clear the libname when complete */
libname imaps clear;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 25 May 2021 12:46:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/743537#M29255</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-05-25T12:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all Data Item queries in SAS Information Map Studio</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/746681#M29439</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt; ,&lt;BR /&gt;&lt;BR /&gt;Firstly, Thanks!&lt;BR /&gt;I ran your code with my specific details (folder+map information) and I have the following coloumns for my data item in results:&lt;/P&gt;
&lt;TABLE class="table" aria-label="Detailed and/or summarized report"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;Path&amp;nbsp;&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;Display name&amp;nbsp;&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;Syntax Name&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;&amp;nbsp;Description&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;&amp;nbsp;Type&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;&amp;nbsp;Format&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;However, there's one column missing - the &lt;STRONG&gt;expression&lt;/STRONG&gt; of each data item. Could you please tell me from which table+column I can find this information?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Eitan&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 07:30:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/746681#M29439</guid>
      <dc:creator>Eitan123</dc:creator>
      <dc:date>2021-06-09T07:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all Data Item queries in SAS Information Map Studio</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/746720#M29440</link>
      <description>&lt;P&gt;I'm not sure the expression/calculation is available using the INFOMAPS engine. See the &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/engimap/p0ycre8a2jsoh7n0zt90jlbblwgv.htm" target="_self"&gt;complete list of dictionary table elements in the documentation&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Keep in mind that Information Maps are--by design--opaque to the end user, meant to obscure the actual physical data and hide the details/complexity. Information Map Studio is the only application that can yield the full details about all of the definitions.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 12:06:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/746720#M29440</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-06-09T12:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all Data Item queries in SAS Information Map Studio</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/768793#M30822</link>
      <description>&lt;P&gt;You can see the expression by using &lt;STRONG&gt;File &amp;gt; Print&lt;/STRONG&gt;. The format is not as nice as using Chris' code though.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Madelyn_SAS_0-1632233539001.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63776i1259D0E84565B1F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Madelyn_SAS_0-1632233539001.png" alt="Madelyn_SAS_0-1632233539001.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 14:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/768793#M30822</guid>
      <dc:creator>Madelyn_SAS</dc:creator>
      <dc:date>2021-09-21T14:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all Data Item queries in SAS Information Map Studio</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/769123#M30834</link>
      <description>&lt;P&gt;What is &lt;STRONG&gt;File &amp;gt; Print&lt;/STRONG&gt;?&lt;/P&gt;
&lt;P&gt;I'm no SAS programmer &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 12:08:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/769123#M30834</guid>
      <dc:creator>Eitan123</dc:creator>
      <dc:date>2021-09-22T12:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all Data Item queries in SAS Information Map Studio</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/769160#M30835</link>
      <description>&lt;P&gt;In SAS Information Map Studio, select the &lt;STRONG&gt;File&lt;/STRONG&gt; menu and then the &lt;STRONG&gt;Print&lt;/STRONG&gt; option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Madelyn_SAS_0-1632316746037.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63896i64B48269D533C708/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Madelyn_SAS_0-1632316746037.png" alt="Madelyn_SAS_0-1632316746037.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 13:19:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Getting-all-Data-Item-queries-in-SAS-Information-Map-Studio/m-p/769160#M30835</guid>
      <dc:creator>Madelyn_SAS</dc:creator>
      <dc:date>2021-09-22T13:19:24Z</dc:date>
    </item>
  </channel>
</rss>

