<?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: fetch mainframe IMS data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306687#M65611</link>
    <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Mainframe BASE SAS, I can see the COPY LIB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using INFILE and input statement to read the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using code like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="xis-code"&gt;  data distribc;
     length  $11;
     keep ziprange
           check_amount
            balrange;
     retain ssa1 'CUSTOMER*D '
              ssa2 'CHCKACCT ';
     infile acctsam dli ssa=(ssa1,ssa2) status=st 
            pcbno=3;&lt;/PRE&gt;&lt;P&gt;Here the CHCKACCT segment contain 2 occurances from position 160 to 320, &amp;nbsp;i need to read amount field from position 163 to 170,&amp;nbsp;first occurances i need to read as AMT1 and second occurance i need to read as AMT2 ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could not find any example from here&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acims/62983/HTML/default/viewer.htm#n10w0tj80b27mfn17odmdjjry3m8.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acims/62983/HTML/default/viewer.htm#n10w0tj80b27mfn17odmdjjry3m8.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;probably i get tech support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Oct 2016 04:05:37 GMT</pubDate>
    <dc:creator>murali_vijayend</dc:creator>
    <dc:date>2016-10-24T04:05:37Z</dc:date>
    <item>
      <title>fetch mainframe IMS data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306641#M65600</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;i can&amp;nbsp;fetch data from ims data through infile stathement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but some time, segments contain multiple occurrences of data...how sas handle ims data multiple occurrence,&lt;/P&gt;&lt;P&gt;for example below situation&lt;/P&gt;&lt;P&gt;01 Automatic Teller Record&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;02 ATM Information&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;03 ATM Location &lt;STRONG&gt;(occurs 20 times) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 04 Location&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 04 ATM Transaction Information &lt;STRONG&gt;(occurs 7 times)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pls share some sample code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks...&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 18:24:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306641#M65600</guid>
      <dc:creator>murali_vijayend</dc:creator>
      <dc:date>2016-10-23T18:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: fetch mainframe IMS data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306651#M65601</link>
      <description>&lt;P&gt;your input record is probably a &lt;STRONG&gt;variable&lt;/STRONG&gt; length and there should be a field containing&lt;/P&gt;
&lt;P&gt;the &lt;STRONG&gt;number of occurences&lt;/STRONG&gt; (probably binary, one or two bytes).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can you post a screenshot or text lines with, at least one record in HEX mode&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and post the record layout&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 19:25:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306651#M65601</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-10-23T19:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: fetch mainframe IMS data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306663#M65602</link>
      <description>&lt;P&gt;If your source data file genuinely has the duplicates you describe, you first need to set some business rules as to how these should be handled. SAS cannot set these rules and we have no knowledge on how they should be handled.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you consult an ATM transaction expert at your bank to advise you on what to do with duplicates (the business rules), then we can talk about how these can be coded in SAS. Remember we know nothing about your data except what you have posted. You need to explain what to do with the duplicates (keep them, discard them, keep some of them, keep the first, keep the last etc...) before we can move forward.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel﻿&lt;/a&gt;&amp;nbsp;has asked we would also need sample data.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 21:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306663#M65602</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-10-23T21:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: fetch mainframe IMS data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306664#M65603</link>
      <description>Hi:&lt;BR /&gt;  As you know, IMS is a hierarchical database that is an IBM product. So, when you use SAS/Access to IMS, you basically have to traverse the hierarchy from parent to child in order to retrieve the records you want. &lt;BR /&gt;&lt;BR /&gt;  I doubt the OP will be able to post IMS data from the database and it wouldn't help anyway, because you'd need SAS/Access to IMS to read the database.&lt;BR /&gt;&lt;BR /&gt;  The documentation for SAS/Access to IMS is here: &lt;A href="http://support.sas.com/documentation/cdl/en/acims/62983/HTML/default/viewer.htm#p09e9rotuvawsin1bxuona8fnv5y.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acims/62983/HTML/default/viewer.htm#p09e9rotuvawsin1bxuona8fnv5y.htm&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;  If you have issues reading specific IMS mainframe data files, it may be more expedient for you to open a track with Tech Support.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Sun, 23 Oct 2016 22:09:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306664#M65603</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-10-23T22:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: fetch mainframe IMS data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306670#M65606</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case you're dealing with a flat file then such a hierarchical structure could also be read without the SAS/Access Interface to IMS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you by any chance have a Cobol Copybook for reading the structure? Are you using DI Studio?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want to read all the data into a single de-normalized SAS table or do you want to extract the data into multiple tables?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're dealing with a flat file: Can you please post some sample data with re-occurences. This would really help to provide you some working sample code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The approach is basically: Have multiple input statement using the&amp;nbsp;@ modifier so you can first determine what kind of record you're dealing with and then branch to the input statement you need for this record.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 23:31:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306670#M65606</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-10-23T23:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: fetch mainframe IMS data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306686#M65610</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Mainframe BASE SAS, I can see the COPY LIB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using INFILE and input statement to read the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using example code like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="xis-code"&gt;  data distribc;
     length  $11;
     keep ziprange
           check_amount
            balrange;
     retain ssa1 'CUSTOMER*D '
              ssa2 'CHCKACCT ';
     infile acctsam dli ssa=(ssa1,ssa2) status=st 
            pcbno=3;&lt;/PRE&gt;&lt;P&gt;Here the CHCKACCT segment contain 2 occurances from position 160 to 320, &amp;nbsp;i need to read amount field from position 163 to 169,&amp;nbsp;first occurances i need to read as AMT1 and second occurance i need to read as AMT2 ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could not find any example from here&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acims/62983/HTML/default/viewer.htm#n10w0tj80b27mfn17odmdjjry3m8.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acims/62983/HTML/default/viewer.htm#n10w0tj80b27mfn17odmdjjry3m8.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let &amp;nbsp;me know if you any doubt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 04:01:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306686#M65610</guid>
      <dc:creator>murali_vijayend</dc:creator>
      <dc:date>2016-10-24T04:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: fetch mainframe IMS data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306687#M65611</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Mainframe BASE SAS, I can see the COPY LIB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using INFILE and input statement to read the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using code like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="xis-code"&gt;  data distribc;
     length  $11;
     keep ziprange
           check_amount
            balrange;
     retain ssa1 'CUSTOMER*D '
              ssa2 'CHCKACCT ';
     infile acctsam dli ssa=(ssa1,ssa2) status=st 
            pcbno=3;&lt;/PRE&gt;&lt;P&gt;Here the CHCKACCT segment contain 2 occurances from position 160 to 320, &amp;nbsp;i need to read amount field from position 163 to 170,&amp;nbsp;first occurances i need to read as AMT1 and second occurance i need to read as AMT2 ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could not find any example from here&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acims/62983/HTML/default/viewer.htm#n10w0tj80b27mfn17odmdjjry3m8.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acims/62983/HTML/default/viewer.htm#n10w0tj80b27mfn17odmdjjry3m8.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;probably i get tech support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 04:05:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306687#M65611</guid>
      <dc:creator>murali_vijayend</dc:creator>
      <dc:date>2016-10-24T04:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: fetch mainframe IMS data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306688#M65612</link>
      <description>&lt;P&gt;Thanks , Am sorry unable to do screen shot, due to security issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Mainframe BASE SAS, I can see the COPY LIB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using INFILE and input statement to read the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using code like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="xis-code"&gt;  data distribc;
     length  $11;
     keep ziprange
           check_amount
            balrange;
     retain ssa1 'CUSTOMER*D '
              ssa2 'CHCKACCT ';
     infile acctsam dli ssa=(ssa1,ssa2) status=st 
            pcbno=3;&lt;/PRE&gt;&lt;P&gt;Here the CHCKACCT segment contain 2 occurances from position 160 to 320, &amp;nbsp;i need to read amount field from position 163 to 170,&amp;nbsp;first occurances i need to read as AMT1 and second occurance i need to read as AMT2 ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could not find any example from here&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acims/62983/HTML/default/viewer.htm#n10w0tj80b27mfn17odmdjjry3m8.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acims/62983/HTML/default/viewer.htm#n10w0tj80b27mfn17odmdjjry3m8.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 04:07:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306688#M65612</guid>
      <dc:creator>murali_vijayend</dc:creator>
      <dc:date>2016-10-24T04:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: fetch mainframe IMS data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306689#M65613</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 04:09:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306689#M65613</guid>
      <dc:creator>murali_vijayend</dc:creator>
      <dc:date>2016-10-24T04:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: fetch mainframe IMS data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306693#M65614</link>
      <description>&lt;P&gt;OK, so it's not a flat file but you're actually directly interfacing with IMS using SAS/Access.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe &lt;EM&gt;Example 1: A Get Call&lt;/EM&gt; could give you some guidance.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acims/62983/HTML/default/viewer.htm#p1q7ur2j0pcgc0n1ebn64jyk21ga.htm&amp;nbsp;" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acims/62983/HTML/default/viewer.htm#p1q7ur2j0pcgc0n1ebn64jyk21ga.htm&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, can't be of more help in this situation but just advise&amp;nbsp;you go with what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas﻿&lt;/a&gt;&amp;nbsp;recommended in case you get stuck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 05:35:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306693#M65614</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-10-24T05:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: fetch mainframe IMS data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306709#M65617</link>
      <description>&lt;P&gt;In case of flat file you may develop a code like in attached document.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 07:17:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fetch-mainframe-IMS-data/m-p/306709#M65617</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-10-24T07:17:41Z</dc:date>
    </item>
  </channel>
</rss>

