-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.sasnb
1 lines (1 loc) · 9.45 KB
/
example.sasnb
1
[{"kind":1,"language":"markdown","value":"# Hello World","outputs":[]},{"kind":2,"language":"sas","value":"data _NULL_;\r\n put 'Hello SAS Innovate';\r\nrun;","outputs":[{"items":[{"data":"[\n\t{\n\t\t\"line\": \"1 title;footnote;ods _all_ close;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"2 ods graphics on;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"3 ods html5 style=Ignite options(bitmap_mode='inline' svg_mode='inline');\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"NOTE: Writing HTML5 Body file: sashtml.htm\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"4 %let _SASPROGRAMFILE = %nrquote(%nrstr(c:\\\\Users\\\\gerdaw\\\\Local\\\\SAS_Repos\\\\SAS-GitHub\\\\sas_snippets\\\\example.sasnb));\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"5 data _NULL_;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"6 put 'Hello SAS Innovate';\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"7 run;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"Hello SAS Innovate\",\n\t\t\"type\": \"normal\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"NOTE: DATA statement used (Total process time):\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" real time 0.00 seconds\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" cpu time 0.00 seconds\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" \",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"8 ;*';*\\\";*/;run;quit;ods html5 close;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t}\n]","mime":"application/vnd.sas.compute.log.lines"}]}]},{"kind":2,"language":"python","value":"print('hello')\r\n\r\ndf = SAS.sd2df('sashelp.cars')\r\nprint(df.shape)","outputs":[{"items":[{"data":"[\n\t{\n\t\t\"line\": \"19 title;footnote;ods _all_ close;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"20 ods graphics on;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"21 ods html5 style=Ignite options(bitmap_mode='inline' svg_mode='inline');\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"NOTE: Writing HTML5 Body file: sashtml2.htm\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"22 %let _SASPROGRAMFILE = %nrquote(%nrstr(c:\\\\Users\\\\gerdaw\\\\Local\\\\SAS_Repos\\\\SAS-GitHub\\\\sas_snippets\\\\example.sasnb));\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"23 proc python;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"24 submit\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"NOTE: Resuming Python state from previous PROC PYTHON invocation.\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"24 ! ;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"25 print('hello')\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"26 \",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"27 df = SAS.sd2df('sashelp.cars')\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"28 print(df.shape)\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"29 endsubmit;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"30 run;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"31 proc printto\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"31 ! log='/opt/sas/viya/config/var/tmp/compsrv/default/ed9c41a8-7cdb-4d9c-a0d1-427f38cab025/SAS_work8CAE000001E0_sas-compute-server-\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"31 ! f8acf8d6-7ffd-479e-b8e4-5cdc36ff4611-13431/sas2py.log';run;\\nfilename sock socket 'localhost:38635' recfm=v encoding='utf-8';\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"NOTE: PROCEDURE PRINTTO used (Total process time):\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" real time 0.00 seconds\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" cpu time 0.00 seconds\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" \",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \">>>\",\n\t\t\"type\": \"normal\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"hello\",\n\t\t\"type\": \"normal\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"(428, 15)\",\n\t\t\"type\": \"normal\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \">>> \",\n\t\t\"type\": \"normal\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"NOTE: PROCEDURE PYTHON used (Total process time):\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" real time 0.25 seconds\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" cpu time 0.04 seconds\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" \",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"34 ;*';*\\\";*/;run;quit;ods html5 close;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t}\n]","mime":"application/vnd.sas.compute.log.lines"}]}]},{"kind":2,"language":"python","value":"SAS.df2sd(df, 'work.aaa')","outputs":[{"items":[{"data":"[\n\t{\n\t\t\"line\": \"35 title;footnote;ods _all_ close;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"36 ods graphics on;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"37 ods html5 style=Ignite options(bitmap_mode='inline' svg_mode='inline');\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"NOTE: Writing HTML5 Body file: sashtml3.htm\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"38 %let _SASPROGRAMFILE = %nrquote(%nrstr(c:\\\\Users\\\\gerdaw\\\\Local\\\\SAS_Repos\\\\SAS-GitHub\\\\sas_snippets\\\\example.sasnb));\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"39 proc python;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"40 submit\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"NOTE: Resuming Python state from previous PROC PYTHON invocation.\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"40 ! ;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"41 SAS.df2sd(df, 'work.aaa')\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"42 endsubmit;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"43 run;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"44 proc printto\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"44 ! log='/opt/sas/viya/config/var/tmp/compsrv/default/ed9c41a8-7cdb-4d9c-a0d1-427f38cab025/SAS_work8CAE000001E0_sas-compute-server-\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"44 ! f8acf8d6-7ffd-479e-b8e4-5cdc36ff4611-13431/sas2py.log';run;\\nfilename sock socket 'localhost:48965' recfm=V termstr=LF\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"NOTE: PROCEDURE PRINTTO used (Total process time):\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" real time 0.00 seconds\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" cpu time 0.00 seconds\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" \",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \">>>\",\n\t\t\"type\": \"normal\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \">>> \",\n\t\t\"type\": \"normal\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"NOTE: PROCEDURE PYTHON used (Total process time):\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" real time 0.11 seconds\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" cpu time 0.02 seconds\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \" \",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"\",\n\t\t\"type\": \"note\",\n\t\t\"version\": 1\n\t},\n\t{\n\t\t\"line\": \"45 ;*';*\\\";*/;run;quit;ods html5 close;\",\n\t\t\"type\": \"source\",\n\t\t\"version\": 1\n\t}\n]","mime":"application/vnd.sas.compute.log.lines"}]}]}]