<?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: %tslit is not recognized on Unix Server in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/tslit-is-not-recognized-on-Unix-Server/m-p/867244#M42663</link>
    <description>&lt;P&gt;Are you sure that whole error is coming just from the unresolved macro reference?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree with Bart, it's probably a problem with the autocall library set up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I would check by running a simple test:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %tslit(foo) ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Just to make sure the problem isn't somewhere else in the macro&amp;nbsp;&lt;SPAN&gt;TXNCNCTIMPTFRMORA.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2023 13:33:59 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2023-03-30T13:33:59Z</dc:date>
    <item>
      <title>%tslit is not recognized on Unix Server</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/tslit-is-not-recognized-on-Unix-Server/m-p/867236#M42661</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The %tslit function is working properly using SAS EG either when we use the development server or the production server.&amp;nbsp; But when comes the time to use that piece of code below, I am getting this error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MPRINT(TXNCNCTIMPTFRMORA): filename jsonf "/dwh_actuariat/sasdata/current/OneCx_Qualitrics/BOnline_S2023032912000000.json";&lt;BR /&gt;MPRINT(TXNCNCTIMPTFRMORA): data _null_;&lt;BR /&gt;MPRINT(TXNCNCTIMPTFRMORA): infile dest1 end=eof;&lt;BR /&gt;22: LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE 242-205: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, arrayname, #, (, +, /, //, ;, @, @@, &lt;BR /&gt;OVERPRINT, _ALL_, _BLANKPAGE_, _ODS_, _PAGE_. &lt;BR /&gt;200: LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.&lt;BR /&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;BR /&gt;MPRINT(TXNCNCTIMPTFRMORA): file jsonf;&lt;BR /&gt;WARNING: Apparent invocation of macro TSLIT not resolved.&lt;BR /&gt;MPRINT(TXNCNCTIMPTFRMORA): if _n_=1 then put %tslit({"contacts":);&lt;BR /&gt;MPRINT(TXNCNCTIMPTFRMORA): input;&lt;BR /&gt;MPRINT(TXNCNCTIMPTFRMORA): put _infile_;&lt;BR /&gt;MPRINT(TXNCNCTIMPTFRMORA): if eof then put '}';&lt;BR /&gt;MPRINT(TXNCNCTIMPTFRMORA): run;&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Making a copy of the json file on the server */

		filename &amp;amp;dest. %sysfunc(quote(%sysfunc(pathname(&amp;amp;dest.))/&amp;amp;JsonFName&amp;amp;orderdate.&amp;amp;ordertime..json));

		data _null_;
  			infile dest1 end=eof;
  			file &amp;amp;dest.;
  			if _n_=1 then put %tslit({"transactionMeta":{"batchId":"&amp;amp;batchid."%str(,) "fields":[&amp;amp;vars.]}%str(,)"contacts":[);
  			input;
  			put _infile_;
  			if eof then put ']}';
		run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any suggestion or work aroung solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 12:36:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/tslit-is-not-recognized-on-Unix-Server/m-p/867236#M42661</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2023-03-30T12:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: %tslit is not recognized on Unix Server</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/tslit-is-not-recognized-on-Unix-Server/m-p/867241#M42662</link>
      <description>&lt;P&gt;Probably path with %Tslit() for sasautos is not added to the session setup.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try not using %tslit(), for example:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile dest1 end=eof;
  file &amp;amp;dest.;
  if _n_=1 then
    do;
      length header $ 1024; 
      header = cats( 
      '{"transactionMeta":{"batchId":"',symget("batchid"),'"%str, "fields":[',symget("vars"),']},"contacts":['
      );
      put header;
    end;
  input;
  put _infile_;
  if eof then put ']}';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 13:18:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/tslit-is-not-recognized-on-Unix-Server/m-p/867241#M42662</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-03-30T13:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: %tslit is not recognized on Unix Server</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/tslit-is-not-recognized-on-Unix-Server/m-p/867244#M42663</link>
      <description>&lt;P&gt;Are you sure that whole error is coming just from the unresolved macro reference?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree with Bart, it's probably a problem with the autocall library set up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I would check by running a simple test:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %tslit(foo) ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Just to make sure the problem isn't somewhere else in the macro&amp;nbsp;&lt;SPAN&gt;TXNCNCTIMPTFRMORA.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 13:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/tslit-is-not-recognized-on-Unix-Server/m-p/867244#M42663</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-03-30T13:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: %tslit is not recognized on Unix Server</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/tslit-is-not-recognized-on-Unix-Server/m-p/867270#M42664</link>
      <description>&lt;P&gt;No need for the macro %TSLIT() you can just call the actual QUOTE() and tell it to use single quotes.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %tslit(xyz);
%put %sysfunc(quote(xyz,%str(%')));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But since the goal is just to write to a text file why bother with any macro logic? The PUT statement should be able to handle what you want to do.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Making a copy of the json file on the server */

filename &amp;amp;dest. %sysfunc(quote(%sysfunc(pathname(&amp;amp;dest.))/&amp;amp;JsonFName&amp;amp;orderdate.&amp;amp;ordertime..json));

data _null_;
  infile dest1 end=eof;
  file &amp;amp;dest.;
  if _n_=1 then put '{"transactionMeta":{"batchId":"' "&amp;amp;batchid." '", "fields":[' "&amp;amp;vars." ']},"contacts":[';
  input;
  put _infile_;
  if eof then put ']}';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Mar 2023 15:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/tslit-is-not-recognized-on-Unix-Server/m-p/867270#M42664</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-03-30T15:12:01Z</dc:date>
    </item>
  </channel>
</rss>

