<?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: SET KEY RETRIEVAL: error in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SET-KEY-RETRIEVAL-error/m-p/24922#M5619</link>
    <description>Ksharp,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for trying to help. &lt;BR /&gt;
&lt;BR /&gt;
However I am not using key=MANDT /unique .&lt;BR /&gt;
&lt;BR /&gt;
I am using &lt;B&gt;set src.device_man (rename=(serge=meter_id)) key=meter_id /unique;&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
I have checked the src.device_man tables and there is already an index on serge (which I then rename to meter_id).&lt;BR /&gt;
&lt;BR /&gt;
I am confused as the error is on MANDT for the table src.dev?? This table doesn't exist.&lt;BR /&gt;
&lt;BR /&gt;
I have found this in the help file;&lt;BR /&gt;
&lt;BR /&gt;
&lt;I&gt;SETKEY works only after SET is called in the SCL program or when a list identifier is passed. The list identifier must point to a list that contains the values of the index key columns. Once an active key is set through SETKEY, it remains active until &lt;BR /&gt;
&lt;BR /&gt;
the table is closed&lt;BR /&gt;
&lt;BR /&gt;
another key is set&lt;BR /&gt;
&lt;BR /&gt;
the current setting is cleared by passing the table identifier alone to SETKEY.&lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
However i am unsure how to clear the setkey?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Lewis</description>
    <pubDate>Wed, 09 Mar 2011 07:51:11 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2011-03-09T07:51:11Z</dc:date>
    <item>
      <title>SET KEY RETRIEVAL: error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-KEY-RETRIEVAL-error/m-p/24920#M5617</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
I am getting the error below;&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Index MANDT requested but not found on data set SRC.DEV.&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
When submitting the following code. It's confusing as I am not calling a table called DEV in the src library? I have a &lt;B&gt;set key= /unique&lt;/B&gt; on the line in bold but on the table src.device_man.&lt;BR /&gt;
&lt;BR /&gt;
Any ideas? Thanks in advance&lt;BR /&gt;
Lewis&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data&lt;BR /&gt;
	d0188_flow_man (&lt;BR /&gt;
		keep=&lt;BR /&gt;
			file_identifier&lt;BR /&gt;
			dataflow_id&lt;BR /&gt;
			file_creation_timestamp&lt;BR /&gt;
			key_meter_supplier_id&lt;BR /&gt;
			key_charging_machine_number&lt;BR /&gt;
			terminal_transaction_number&lt;BR /&gt;
			customer_payment_date&lt;BR /&gt;
			customer_payment_amount&lt;BR /&gt;
			meter_id&lt;BR /&gt;
			standing_charge&lt;BR /&gt;
			debt_recovery_rate&lt;BR /&gt;
			active_credit_on_key&lt;BR /&gt;
			total_credit_accepted&lt;BR /&gt;
			credit_balance&lt;BR /&gt;
			mpan_core&lt;BR /&gt;
			reading_date_and_time&lt;BR /&gt;
			register_reading1&lt;BR /&gt;
			register_reading2&lt;BR /&gt;
			prepayment_unit_rate1&lt;BR /&gt;
			prepayment_unit_rate2&lt;BR /&gt;
	)&lt;BR /&gt;
	d0188_file_man (&lt;BR /&gt;
		keep=&lt;BR /&gt;
			file_identifier&lt;BR /&gt;
			dataflow&lt;BR /&gt;
			from_market_participant_role&lt;BR /&gt;
			from_market_participant_id&lt;BR /&gt;
			to_market_participant_role&lt;BR /&gt;
			to_market_participant_id&lt;BR /&gt;
			file_creation_timestamp&lt;BR /&gt;
			sending_application_id&lt;BR /&gt;
			receiving_application_id&lt;BR /&gt;
			broadcast&lt;BR /&gt;
			test_data_flag&lt;BR /&gt;
			file_identifier_t&lt;BR /&gt;
			total_group_count&lt;BR /&gt;
			checksum&lt;BR /&gt;
			flow_count&lt;BR /&gt;
			file_completion_timestamp&lt;BR /&gt;
	)&lt;BR /&gt;
;&lt;BR /&gt;
	infile dir truncover;&lt;BR /&gt;
	input filename $255.;&lt;BR /&gt;
	filepath = "&amp;amp;d0188_dir\" || filename;&lt;BR /&gt;
&lt;BR /&gt;
	infile d0188 filevar=filepath end=done dsd dlm='|';&lt;BR /&gt;
	bag_it = 0;&lt;BR /&gt;
&lt;BR /&gt;
	do while (^done);&lt;BR /&gt;
		input group :$char3. @;&lt;BR /&gt;
&lt;BR /&gt;
		select (group);&lt;BR /&gt;
		when ('ZHV')  /* header */&lt;BR /&gt;
			do;&lt;BR /&gt;
				input&lt;BR /&gt;
					file_identifier :$char10.&lt;BR /&gt;
					dataflow :$char8.&lt;BR /&gt;
					from_market_participant_role :$char1.&lt;BR /&gt;
					from_market_participant_id :$char4.&lt;BR /&gt;
					to_market_participant_role :$char1.&lt;BR /&gt;
					to_market_participant_id :$char4.&lt;BR /&gt;
					file_creation_timestamp :$char14.&lt;BR /&gt;
					sending_application_id :$char5.&lt;BR /&gt;
					receiving_application_id :$char5.&lt;BR /&gt;
					broadcast :$char1.&lt;BR /&gt;
					test_data_flag :$char4.&lt;BR /&gt;
				;&lt;BR /&gt;
				dataflow_id = 0;&lt;BR /&gt;
				bag_it = 0;&lt;BR /&gt;
			end;&lt;BR /&gt;
		when ('386')&lt;BR /&gt;
			do;&lt;BR /&gt;
				if bag_it then&lt;BR /&gt;
					output d0188_flow_man;&lt;BR /&gt;
&lt;BR /&gt;
				input&lt;BR /&gt;
					key_meter_supplier_id :$char20.&lt;BR /&gt;
					key_charging_machine_number :7.&lt;BR /&gt;
					terminal_transaction_number :6.&lt;BR /&gt;
					customer_payment_date :$char8.&lt;BR /&gt;
					customer_payment_amount :9.2&lt;BR /&gt;
					meter_id :$char10. @&lt;BR /&gt;
				;&lt;BR /&gt;
&lt;BR /&gt;
				&lt;B&gt;set src.device_man (rename=(serge=meter_id)) key=meter_id /unique;&lt;/B&gt;				bag_it = (_iorc_ = %sysrc(_sok));&lt;BR /&gt;
&lt;BR /&gt;
				if bag_it then&lt;BR /&gt;
					do;&lt;BR /&gt;
						input&lt;BR /&gt;
							standing_charge :6.2&lt;BR /&gt;
							debt_recovery_rate :6.2&lt;BR /&gt;
							active_credit_on_key :6.2&lt;BR /&gt;
							key_debt :8.2&lt;BR /&gt;
							key_date_stamp :$char14.&lt;BR /&gt;
							reading_date_and_time :$char14.&lt;BR /&gt;
							total_credit_accepted :8.2&lt;BR /&gt;
							credit_balance :7.2&lt;BR /&gt;
							mpan_core :$char13.&lt;BR /&gt;
						;&lt;BR /&gt;
						register_reading1 = .;&lt;BR /&gt;
						register_reading2 = .;&lt;BR /&gt;
						prepayment_unit_rate1 = .;&lt;BR /&gt;
						prepayment_unit_rate2 = .;&lt;BR /&gt;
					end;&lt;BR /&gt;
				else&lt;BR /&gt;
					do;&lt;BR /&gt;
						_error_ = 0;&lt;BR /&gt;
						input;&lt;BR /&gt;
					end;&lt;BR /&gt;
&lt;BR /&gt;
				dataflow_id = dataflow_id + 1;&lt;BR /&gt;
			end;&lt;BR /&gt;
		when ('387')&lt;BR /&gt;
			if bag_it then&lt;BR /&gt;
				do;&lt;BR /&gt;
					input	meter_register_id :$char2. @;&lt;BR /&gt;
&lt;BR /&gt;
					select (meter_register_id);&lt;BR /&gt;
					when ('0', '00', '1', '01', 'R1', 'A1', 'A8')&lt;BR /&gt;
						input register_reading1 :10.1 prepayment_unit_rate1 :6.2;&lt;BR /&gt;
					when ('2', '02', 'R2', 'A7')&lt;BR /&gt;
						input register_reading2 :10.1 prepayment_unit_rate2 :6.2;&lt;BR /&gt;
					otherwise&lt;BR /&gt;
						input @'|' @'|';  /* skip any additional registers */&lt;BR /&gt;
					end;&lt;BR /&gt;
				end;&lt;BR /&gt;
			else&lt;BR /&gt;
				input;&lt;BR /&gt;
		when ('ZPT')  /* trailer */&lt;BR /&gt;
			do;&lt;BR /&gt;
				if bag_it then&lt;BR /&gt;
					output d0188_flow_man;&lt;BR /&gt;
&lt;BR /&gt;
				input&lt;BR /&gt;
					file_identifier_t :$char10.&lt;BR /&gt;
					total_group_count :10.&lt;BR /&gt;
					checksum :10.&lt;BR /&gt;
					flow_count :8.&lt;BR /&gt;
					file_completion_timestamp :$char14.&lt;BR /&gt;
				;&lt;BR /&gt;
				output d0188_file_man;&lt;BR /&gt;
			end;&lt;BR /&gt;
		end;&lt;BR /&gt;
	end;&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 08 Mar 2011 21:03:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-KEY-RETRIEVAL-error/m-p/24920#M5617</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-08T21:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: SET KEY RETRIEVAL: error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-KEY-RETRIEVAL-error/m-p/24921#M5618</link>
      <description>Yes.&lt;BR /&gt;
Before useing set key=MANDT  /unique ,You need to make an index for him.&lt;BR /&gt;
Try to use proc datasets OR proc sql to make an index.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Wed, 09 Mar 2011 05:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-KEY-RETRIEVAL-error/m-p/24921#M5618</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-03-09T05:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: SET KEY RETRIEVAL: error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-KEY-RETRIEVAL-error/m-p/24922#M5619</link>
      <description>Ksharp,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for trying to help. &lt;BR /&gt;
&lt;BR /&gt;
However I am not using key=MANDT /unique .&lt;BR /&gt;
&lt;BR /&gt;
I am using &lt;B&gt;set src.device_man (rename=(serge=meter_id)) key=meter_id /unique;&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
I have checked the src.device_man tables and there is already an index on serge (which I then rename to meter_id).&lt;BR /&gt;
&lt;BR /&gt;
I am confused as the error is on MANDT for the table src.dev?? This table doesn't exist.&lt;BR /&gt;
&lt;BR /&gt;
I have found this in the help file;&lt;BR /&gt;
&lt;BR /&gt;
&lt;I&gt;SETKEY works only after SET is called in the SCL program or when a list identifier is passed. The list identifier must point to a list that contains the values of the index key columns. Once an active key is set through SETKEY, it remains active until &lt;BR /&gt;
&lt;BR /&gt;
the table is closed&lt;BR /&gt;
&lt;BR /&gt;
another key is set&lt;BR /&gt;
&lt;BR /&gt;
the current setting is cleared by passing the table identifier alone to SETKEY.&lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
However i am unsure how to clear the setkey?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Lewis</description>
      <pubDate>Wed, 09 Mar 2011 07:51:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-KEY-RETRIEVAL-error/m-p/24922#M5619</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-09T07:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: SET KEY RETRIEVAL: error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-KEY-RETRIEVAL-error/m-p/24923#M5620</link>
      <description>Thanks for you're help.&lt;BR /&gt;
&lt;BR /&gt;
I removed the index and reapplied using proc datasets and it now runs fine.&lt;BR /&gt;
&lt;BR /&gt;
Many thanks,&lt;BR /&gt;
Lewis</description>
      <pubDate>Wed, 09 Mar 2011 08:09:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-KEY-RETRIEVAL-error/m-p/24923#M5620</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-09T08:09:34Z</dc:date>
    </item>
  </channel>
</rss>

