<?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: Proc Cimport showing error while reading BINARY file from mainframe in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/882295#M348595</link>
    <description>&lt;P&gt;Thanks, i tried checking it is keep on running and not stopping the execution&lt;/P&gt;</description>
    <pubDate>Sun, 25 Jun 2023 03:02:46 GMT</pubDate>
    <dc:creator>mudassir786</dc:creator>
    <dc:date>2023-06-25T03:02:46Z</dc:date>
    <item>
      <title>Proc Cimport showing error while reading BINARY file from mainframe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/881878#M348454</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Im trying to read SAS output created in mainframe. It was created with proc CPORT.&lt;/P&gt;&lt;P&gt;the file was then mailed by mainframe team. they downloaded it as Binary file.&amp;nbsp; Now im trying to read this file in proc cimport in sas eg windows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im using the below code&lt;/P&gt;&lt;P&gt;----------------------------&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%let&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;schemacode = /opt/shares/sas/production/znative_sas/SAS_CODES/tmp/Safety_SAS;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%put&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;amp;schemacode;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;filename&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;filenm&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"&amp;amp;schemacode/'FFU.SF010010.T36A'"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;PROC&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;CIMPORT&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;DATA&lt;/SPAN&gt;&lt;SPAN&gt;=ABC&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;INFILE&lt;/SPAN&gt;&lt;SPAN&gt;=filenm;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;RUN&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;getting error as unregocnized file format&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 11:41:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/881878#M348454</guid>
      <dc:creator>mudassir786</dc:creator>
      <dc:date>2023-06-22T11:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Cimport showing error while reading BINARY file from mainframe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/881893#M348459</link>
      <description>Then do not transport this file via binary mode. &lt;BR /&gt;If you are using FTP to transport then do not use BINARY command, just use PUT or MPUT  command .</description>
      <pubDate>Thu, 22 Jun 2023 12:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/881893#M348459</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-06-22T12:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Cimport showing error while reading BINARY file from mainframe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/881906#M348463</link>
      <description>&lt;P&gt;"mailed"?&amp;nbsp; That might not be such a good idea.&amp;nbsp; Are you sure the file was mailed as a BINARY file?&amp;nbsp; If it tried to transcode EBCDIC to ASCII or treated it as lines then it would have corrupted the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Read the first 160 to 240 bytes of the file and see what they look like.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename filenm  "&amp;amp;schemacode/'FFU.SF010010.T36A'";
data _null_;
  infile filenm lrecl=80 recfm=n obs=3 ;
  input;
  list;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The first record should look exactly like the one I get when I dump SASHELP.CLASS to a CPORT file.&lt;/P&gt;
&lt;PRE&gt;1039  proc cport data=sashelp.class file=cport; run;


NOTE: PROC CPORT begins to transport data set SASHELP.CLASS
NOTE: The data set contains 5 variables and 19 observations.
      Logical record length is 40.
NOTE: PROCEDURE CPORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


1040  data _null_;
1041    infile cport lrecl=80 recfm=f obs=3;
1042    input;
1043    list;
1044  run;

NOTE: The infile CPORT is:
      (system-specific pathname),
      (system-specific file attributes)

RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
1         **COMPRESSED** **COMPRESSED** **COMPRESSED** **COMPRESSED** **COMPRESSED********

2   CHAR  LIB CONTROL X64_10PR¼. SAS9.4¼ƒI¼¥D901SASHELP CLASS¼™VC5¼‚RC19¼ˆRL40¼ˆ1¼‡S 0  0
    ZONE  44424445544253353355B02545323B84BA43335454445244455B9543B85433B85433B83B85232232
    NUMR  C9203FE42FC0864F1002C603139E4C39C5490131385C003C133C9635C22319C82C40C81C73000000

3   CHAR   12 NO¼„0¼‰1¼•ansi¼‚¼.¼‚¼Î¼ÎStudent Data¼ÂSPAN CONTROL -7¼‚40¼…1¼†40¼ŠL¼ˆ40¼Ž¼&amp;amp;¼
    ZONE  233244B83B83B96676B8B0B8BCBC577666724676BC554424445544223B833B83B833B84B833B8B2B
    NUMR  0120EFC40C91C51E39C2C2C2CECE34545E404141C2301E03FE42FC0D7C240C51C640CACC840CEC6C
NOTE: 3 records were read from the infile (system-specific pathname).
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jun 2023 14:04:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/881906#M348463</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-22T14:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Cimport showing error while reading BINARY file from mainframe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/882030#M348491</link>
      <description>&lt;P&gt;You need to follow the instructions in this SAS Note:&amp;nbsp;&lt;A href="https://support.sas.com/kb/22/193.html" target="_blank"&gt;https://support.sas.com/kb/22/193.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The important things are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create a transport file using CPORT on the mainframe with these characteristics:&amp;nbsp;LRECL=80 RECFM=FB BLKSIZE=8000. This creates an ASCII-formatted file.&lt;/LI&gt;
&lt;LI&gt;Transfer the file from mainframe to PC / Server using the BINARY method. This will retain the ASCII format so it can be read correctly on the target machine.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 22 Jun 2023 20:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/882030#M348491</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-06-22T20:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Cimport showing error while reading BINARY file from mainframe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/882294#M348594</link>
      <description>&lt;P&gt;will try with that .. just checking is it recommended to read it through ftp?&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2023 02:57:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/882294#M348594</guid>
      <dc:creator>mudassir786</dc:creator>
      <dc:date>2023-06-25T02:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Cimport showing error while reading BINARY file from mainframe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/882295#M348595</link>
      <description>&lt;P&gt;Thanks, i tried checking it is keep on running and not stopping the execution&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2023 03:02:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/882295#M348595</guid>
      <dc:creator>mudassir786</dc:creator>
      <dc:date>2023-06-25T03:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Cimport showing error while reading BINARY file from mainframe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/882296#M348596</link>
      <description>&lt;P&gt;Make sure to use OBS=3 and RECFM=F.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it still takes more than a micro second then you either have a typo somewhere causing unbalanced quotes or the file you are reading is frozen some how.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2023 03:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Cimport-showing-error-while-reading-BINARY-file-from/m-p/882296#M348596</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-25T03:43:09Z</dc:date>
    </item>
  </channel>
</rss>

