<?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: Updating JSON files…. in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826165#M1448</link>
    <description>Thanks for your response.&lt;BR /&gt;&lt;BR /&gt;Creating JSON files is not an issue. These files are being updated every day. &lt;BR /&gt;The automation i.e. to upload/update these JSON files  to public folder (SAS JOB EXECUTION) religiously is an issue.&lt;BR /&gt;</description>
    <pubDate>Fri, 29 Jul 2022 14:05:40 GMT</pubDate>
    <dc:creator>GPatel</dc:creator>
    <dc:date>2022-07-29T14:05:40Z</dc:date>
    <item>
      <title>Updating JSON files….</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826073#M1446</link>
      <description>All:&lt;BR /&gt;&lt;BR /&gt;I have SAS viya studio code that defines JSON files.&lt;BR /&gt;These files are being updated every day.&lt;BR /&gt;&lt;BR /&gt;First time, I uploaded /copied manually but now &lt;BR /&gt;I would like to update these JSON files @&lt;BR /&gt;/public/json folder every day at 8:00am using either&lt;BR /&gt;SAS Viya Studio and Job VIYA execution components.&lt;BR /&gt;&lt;BR /&gt;Proc export doesn’t work….&lt;BR /&gt;&lt;BR /&gt;Proc export data=“/xyz/test/abc.json&lt;BR /&gt;…..&lt;BR /&gt;……&lt;BR /&gt;Run;&lt;BR /&gt;&lt;BR /&gt;JSON FILEs provides autofill and autocomplete favors as opposed to use SAS data file from CAS library to be used for Drop down selections!! &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How can I successfully set up&lt;BR /&gt;This actions / activities?</description>
      <pubDate>Thu, 28 Jul 2022 23:39:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826073#M1446</guid>
      <dc:creator>GPatel</dc:creator>
      <dc:date>2022-07-28T23:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Updating JSON files….</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826162#M1447</link>
      <description>If you're trying to create a JSON file in SAS, PROC JSON would be one method. You can use the JSON libname engine to read an existing JSON file.</description>
      <pubDate>Fri, 29 Jul 2022 13:36:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826162#M1447</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2022-07-29T13:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Updating JSON files….</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826165#M1448</link>
      <description>Thanks for your response.&lt;BR /&gt;&lt;BR /&gt;Creating JSON files is not an issue. These files are being updated every day. &lt;BR /&gt;The automation i.e. to upload/update these JSON files  to public folder (SAS JOB EXECUTION) religiously is an issue.&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Jul 2022 14:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826165#M1448</guid>
      <dc:creator>GPatel</dc:creator>
      <dc:date>2022-07-29T14:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Updating JSON files….</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826169#M1449</link>
      <description>&lt;P&gt;When you say update the json files, do you want to over-write them with a new version?&amp;nbsp; Or are you trying to insert records into an existing JSON file?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since JSON is a text file, I guess you could try to update it in place like any other text file.&amp;nbsp; But I think if I were doing it, I would probably read the current JSON file into a SAS dataset, do the updates to the SAS dataset, and then export the updated SAS dataset to JSON, over-writing to the original JSON file.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 14:46:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826169#M1449</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-07-29T14:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Updating JSON files….</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826173#M1450</link>
      <description>Thanks for your attention and reply.&lt;BR /&gt;&lt;BR /&gt;I have /public/json  folder in VIYA JOB EXECUTION and &lt;BR /&gt;I want to update  daily JSON files into that /public/json folder with automation by scheduled job ! &lt;BR /&gt;&lt;BR /&gt;My SAS code updates JSON files without any issue, but i want to upload / update them into /public/json folder with automation ( scheduling job to be run at certain time, so that it will update folder.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Jul 2022 14:58:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826173#M1450</guid>
      <dc:creator>GPatel</dc:creator>
      <dc:date>2022-07-29T14:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Updating JSON files….</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826180#M1451</link>
      <description>&lt;P&gt;It really doesn't sound like your question is about JSON at all, but just about moving files and scheduling jobs.&lt;/P&gt;
&lt;P&gt;Which parts are you having trouble with?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you write the file to the place you need it?&amp;nbsp; Is the path on the machine where SAS is running?&amp;nbsp; Are you using VIYA or SAS?&amp;nbsp; Do you have permission to write it there?&amp;nbsp; Can you try writing some other file just to make sure?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you schedule a job to run at a particular time of day?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What have you tried? How did it not do what you wanted?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 15:38:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826180#M1451</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-07-29T15:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Updating JSON files….</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826211#M1452</link>
      <description>Is your meaning that /public/json is a folder in SAS Content (rather than a physical path)?&lt;BR /&gt;&lt;BR /&gt;If so, the FILESVC access method can be used to read and write to the content server.&lt;BR /&gt;&lt;BR /&gt;FILENAME Statement: FILESRVC Access Method&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p0qapul7pyz9hmn0zfoefj0c278a.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p0qapul7pyz9hmn0zfoefj0c278a.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;More information on scheduling in Viya can be found here:&lt;BR /&gt;&lt;BR /&gt;Tips for Scheduling Flows with SAS Viya Environment Manager&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/sgf/2021/05/05/tips-for-scheduling-flows-with-sas-viya-environment-manager/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2021/05/05/tips-for-scheduling-flows-with-sas-viya-environment-manager/&lt;/A&gt;</description>
      <pubDate>Fri, 29 Jul 2022 19:19:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826211#M1452</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2022-07-29T19:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Updating JSON files….</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826218#M1453</link>
      <description>&lt;P&gt;Thanks for shedding some more lights on the topic.&lt;/P&gt;
&lt;P&gt;The name of the game is to automate :&lt;/P&gt;
&lt;P&gt;Upload daily updated JSON files&amp;nbsp; &amp;nbsp; to /Public/JSON folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is SAS code to update JSON file everyday - I can schedule to run this job everyday.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;set Unq_Circuit end=eof;&lt;BR /&gt;file "/&lt;FONT color="#000000"&gt;../../.././.&lt;/FONT&gt;/gpatel/JSON/test_Circuit.json" ;&lt;BR /&gt;if _n_=1 then put '[';&lt;BR /&gt;if not eof then delim=',';&lt;BR /&gt;put '{"Value":' Value ' "Text":' Text'}' delim ;&lt;BR /&gt;if eof then put ']';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;NOTE: 351 records were written to the file "/&lt;FONT color="#000000"&gt;../../.././.&lt;/FONT&gt;/JSON/test_Circuit.json".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am referring&amp;nbsp;@&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p0qapul7pyz9hmn0zfoefj0c278a.htm#n1r5vtf23xmswyn1wj64ciztjp3j" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p0qapul7pyz9hmn0zfoefj0c278a.htm#n1r5vtf23xmswyn1wj64ciztjp3j&lt;/A&gt;....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks again....&lt;/SPAN&gt;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 19:38:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826218#M1453</guid>
      <dc:creator>GPatel</dc:creator>
      <dc:date>2022-07-29T19:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Updating JSON files….</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826221#M1454</link>
      <description>Dear Gwootton :&lt;BR /&gt;I used your suggestive action.....Here is log....&lt;BR /&gt;filename jobout filesrvc &lt;BR /&gt;   parenturi='/files/files/e2a8832f-03ce-46c8-ba5d-df61136c922c';&lt;BR /&gt;data _null_;&lt;BR /&gt;   set Unq_Circuit end=eof;&lt;BR /&gt;   file  jobout('test_Circuit.json') ;&lt;BR /&gt;    if _n_=1 then put '[';&lt;BR /&gt;  if not eof then delim=',';&lt;BR /&gt;  put '{"Value":' Value ' "Text":' Text'}' delim ;&lt;BR /&gt;  if eof then put ']';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;79   filename jobout filesrvc&lt;BR /&gt;80      parenturi='/files/files/e2a8832f-03ce-46c8-ba5d-df61136c922c';&lt;BR /&gt;81   data _null_;&lt;BR /&gt;82      set Unq_Circuit end=eof;&lt;BR /&gt;83      file  jobout('test_Circuit.json') ;&lt;BR /&gt;84       if _n_=1 then put '[';&lt;BR /&gt;85     if not eof then delim=',';&lt;BR /&gt;86     put '{"Value":' Value ' "Text":' Text'}' delim ;&lt;BR /&gt;87     if eof then put ']';&lt;BR /&gt;88   run;&lt;BR /&gt;NOTE: The file library JOBOUT is:&lt;BR /&gt;      Directory=/files/files?parentUri=/files/files/e2a8832f-03ce-46c8-ba5d-df61136c922c,&lt;BR /&gt;      Description=Directory for ParentUri collection&lt;BR /&gt;NOTE: The file JOBOUT('test_Circuit.json') is:&lt;BR /&gt;      Filename=test_Circuit.json,&lt;BR /&gt;      URI path=/files/files/9f0061da-9011-47b0-821d-1358b093cd11,&lt;BR /&gt;      File Identifier=9f0061da-9011-47b0-821d-1358b093cd11,&lt;BR /&gt;      Content Type=application/json,&lt;BR /&gt;      Parent URI=/files/files/e2a8832f-03ce-46c8-ba5d-df61136c922c,&lt;BR /&gt;      Encoding=UTF-8,Searchable=false,RECFM=V,&lt;BR /&gt;      LRECL=32767,File Size (bytes)=10474,&lt;BR /&gt;      Last Modified=29Jul2022:19:52:56,&lt;BR /&gt;      Create Time=29Jul2022:19:51:38&lt;BR /&gt;NOTE: A total of 351 records were written to the file library JOBOUT.&lt;BR /&gt;      The minimum record length was 1.&lt;BR /&gt;      The maximum record length was 29.&lt;BR /&gt;NOTE: 351 records were written to the file JOBOUT('test_Circuit.json').&lt;BR /&gt;      The minimum record length was 1.&lt;BR /&gt;      The maximum record length was 29.&lt;BR /&gt;NOTE: There were 349 observations read from the data set WORK.UNQ_CIRCUIT.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;      real time           0.48 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But I could not locate this file!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Jul 2022 20:03:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826221#M1454</guid>
      <dc:creator>GPatel</dc:creator>
      <dc:date>2022-07-29T20:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Updating JSON files….</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826223#M1455</link>
      <description>Thanks to all, and specially to&amp;nbsp;Dear Gwootton :&lt;BR /&gt;&lt;BR /&gt;Upon updating SAS code to this....It worked like&amp;nbsp; a charm.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;filename jobout filesrvc folderPath='/Public/Json';&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;set Unq_Circuit end=eof;&lt;BR /&gt;file jobout('test_Circuit.json') ;&lt;BR /&gt;if _n_=1 then put '[';&lt;BR /&gt;if not eof then delim=',';&lt;BR /&gt;put '{"Value":' Value ' "Text":' Text'}' delim ;&lt;BR /&gt;if eof then put ']';&lt;BR /&gt;run;&lt;BR /&gt;79   filename jobout filesrvc folderPath='/Public/Json';&lt;BR /&gt;80   &lt;BR /&gt;81   data _null_;&lt;BR /&gt;82      set Unq_Circuit end=eof;&lt;BR /&gt;83      file  jobout('test_Circuit.json') ;&lt;BR /&gt;84       if _n_=1 then put '[';&lt;BR /&gt;85     if not eof then delim=',';&lt;BR /&gt;86     put '{"Value":' Value ' "Text":' Text'}' delim ;&lt;BR /&gt;87     if eof then put ']';&lt;BR /&gt;88   run;&lt;BR /&gt;NOTE: The file library JOBOUT is:&lt;BR /&gt;      Directory=/Public/Json,&lt;BR /&gt;      Folder Identifier=4880eafd-d5e5-4ae6-ad0e-7e242d0b44d9,&lt;BR /&gt;      Last Modified=10Jan2022:19:18:17&lt;BR /&gt;NOTE: The file JOBOUT('test_Circuit.json') is:&lt;BR /&gt;      Filename=Test_Circuit.json,&lt;BR /&gt;      URI path=/files/files/e2a8832f-03ce-46c8-ba5d-df61136c922c,&lt;BR /&gt;      File Identifier=e2a8832f-03ce-46c8-ba5d-df61136c922c,&lt;BR /&gt;      Document Type=file,Content Type=text/plain,&lt;BR /&gt;      Content Disposition=inline;filename*=utf-8''Test_Circuit.json,&lt;BR /&gt;      Encoding=UTF-8,Searchable=true,RECFM=V,&lt;BR /&gt;      LRECL=32767,File Size (bytes)=0,&lt;BR /&gt;      Last Modified=29Jul2022:19:50:59,&lt;BR /&gt;      Create Time=29Jul2022:19:50:58&lt;BR /&gt;NOTE: A total of 351 records were written to the file library JOBOUT.&lt;BR /&gt;      The minimum record length was 1.&lt;BR /&gt;      The maximum record length was 29.&lt;BR /&gt;NOTE: 351 records were written to the file JOBOUT('test_Circuit.json').&lt;BR /&gt;      The minimum record length was 1.&lt;BR /&gt;      The maximum record length was 29.&lt;BR /&gt;NOTE: There were 349 observations read from the data set WORK.UNQ_CIRCUIT.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;      real time           0.66 seconds</description>
      <pubDate>Fri, 29 Jul 2022 20:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826223#M1455</guid>
      <dc:creator>GPatel</dc:creator>
      <dc:date>2022-07-29T20:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Updating JSON files….</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826224#M1456</link>
      <description>Thanks  Dear Gwootton. I appreciate your insight, attention, and support. I learned some thing new and useful in VIYA world.&lt;BR /&gt;&lt;BR /&gt;_ GPatel&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Jul 2022 20:32:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Updating-JSON-files/m-p/826224#M1456</guid>
      <dc:creator>GPatel</dc:creator>
      <dc:date>2022-07-29T20:32:04Z</dc:date>
    </item>
  </channel>
</rss>

