<?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 Stuck on Proc Format Issue - Please Help! in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Stuck-on-Proc-Format-Issue-Please-Help/m-p/173113#M44595</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below is an extract from a dataset i use to convert to a format library. I have another data set which calls the format library later on in the code. Basically, the other data set contans details of the vehicle age of the policy and I use the put (vehicle age, format name) function to find the label that corresponds to the vehicle age. So if the vehcile age is 1 and the product is AAA, the put function returns a value the letter A.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;TableName&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Product&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Start&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;End&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Label&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;BBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;BBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;BBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the label depends both on the table name &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;and&lt;/STRONG&gt;&lt;/SPAN&gt; the product I convert the above table into the table below and create a format library based on this table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;FMTNAME&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Start&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;End&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;LABEL&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGEAAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGEAAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGEAAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGEBBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGEBBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGEBBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;usin the code...&lt;/P&gt;&lt;P&gt;Data dataset1;&lt;/P&gt;&lt;P&gt;set dataset;&lt;/P&gt;&lt;P&gt;fmtname = tablename||product;&lt;/P&gt;&lt;P&gt;keep fmtname start end label;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format cntlin = dataset1; fmtlib; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine so I have my format library.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is where I want to execute the put statement so that my dataset with the policy info pulls in the label from this table. If there was only one product, say AAA, then the code;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data policydata1;&lt;/P&gt;&lt;P&gt;set policy data;&lt;/P&gt;&lt;P&gt;vehiclageband = put(vehicleage, drvageaaa.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, there are many products and I want the code to be able to be dynamic with regard to the product. The product field in the policy dataset is called 'product' so I want the code to be dynamic, I tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data policydata1;&lt;/P&gt;&lt;P&gt;set policy data;&lt;/P&gt;&lt;P&gt;vehicleageband = put(vehicleage, "drvage"||product.)&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this returns errors. Does anyone have a way around this? I've been searching the internet for ages.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 May 2014 14:22:36 GMT</pubDate>
    <dc:creator>brophymj</dc:creator>
    <dc:date>2014-05-26T14:22:36Z</dc:date>
    <item>
      <title>Stuck on Proc Format Issue - Please Help!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Stuck-on-Proc-Format-Issue-Please-Help/m-p/173113#M44595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below is an extract from a dataset i use to convert to a format library. I have another data set which calls the format library later on in the code. Basically, the other data set contans details of the vehicle age of the policy and I use the put (vehicle age, format name) function to find the label that corresponds to the vehicle age. So if the vehcile age is 1 and the product is AAA, the put function returns a value the letter A.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;TableName&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Product&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Start&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;End&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Label&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;BBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;BBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;BBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the label depends both on the table name &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;and&lt;/STRONG&gt;&lt;/SPAN&gt; the product I convert the above table into the table below and create a format library based on this table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;FMTNAME&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Start&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;End&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;LABEL&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGEAAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGEAAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGEAAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGEBBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGEBBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DRVAGEBBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;usin the code...&lt;/P&gt;&lt;P&gt;Data dataset1;&lt;/P&gt;&lt;P&gt;set dataset;&lt;/P&gt;&lt;P&gt;fmtname = tablename||product;&lt;/P&gt;&lt;P&gt;keep fmtname start end label;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format cntlin = dataset1; fmtlib; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine so I have my format library.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is where I want to execute the put statement so that my dataset with the policy info pulls in the label from this table. If there was only one product, say AAA, then the code;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data policydata1;&lt;/P&gt;&lt;P&gt;set policy data;&lt;/P&gt;&lt;P&gt;vehiclageband = put(vehicleage, drvageaaa.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, there are many products and I want the code to be able to be dynamic with regard to the product. The product field in the policy dataset is called 'product' so I want the code to be dynamic, I tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data policydata1;&lt;/P&gt;&lt;P&gt;set policy data;&lt;/P&gt;&lt;P&gt;vehicleageband = put(vehicleage, "drvage"||product.)&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this returns errors. Does anyone have a way around this? I've been searching the internet for ages.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2014 14:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Stuck-on-Proc-Format-Issue-Please-Help/m-p/173113#M44595</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2014-05-26T14:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Stuck on Proc Format Issue - Please Help!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Stuck-on-Proc-Format-Issue-Please-Help/m-p/173114#M44596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at the putc/putn functions instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: Also make sure your concatenation isn't introducing extra spaces so trim or use the appropriate cat function, such as CATT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2014 14:50:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Stuck-on-Proc-Format-Issue-Please-Help/m-p/173114#M44596</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-05-26T14:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Stuck on Proc Format Issue - Please Help!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Stuck-on-Proc-Format-Issue-Please-Help/m-p/173115#M44597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you be able to give an example of how it would be used in this scenario?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, the code works when I put in the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data policydata1;&lt;/P&gt;&lt;P&gt;set policydata;&lt;/P&gt;&lt;P&gt;vehicleagebad = put(vehicleage,drvageaaa.)&amp;nbsp; -&amp;gt; (the drvagaaa. is highlighted in green)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I want to replace the aaa in the expression to a dynamic variable that varies depending on the product, so if the product is aaa, it will look up drvageaaa; if it's bbb, it will look up drvagebbb, and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The product is a field in the policydata dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2014 15:13:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Stuck-on-Proc-Format-Issue-Please-Help/m-p/173115#M44597</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2014-05-26T15:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Stuck on Proc Format Issue - Please Help!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Stuck-on-Proc-Format-Issue-Please-Help/m-p/173116#M44598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change the put to putn in your example and use catt instead of ||&lt;/P&gt;&lt;P&gt;If you still can't get it to work let me know and I'll post an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vehicleageband = putn(vehicleage, catt("drvage", product))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2014 15:43:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Stuck-on-Proc-Format-Issue-Please-Help/m-p/173116#M44598</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-05-26T15:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Stuck on Proc Format Issue - Please Help!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Stuck-on-Proc-Format-Issue-Please-Help/m-p/173117#M44599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, that worked!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2014 16:03:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Stuck-on-Proc-Format-Issue-Please-Help/m-p/173117#M44599</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2014-05-26T16:03:31Z</dc:date>
    </item>
  </channel>
</rss>

