<?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: Difficulties in reading the external file data in ebcdic format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70026#M15165</link>
    <description>Hi &lt;BR /&gt;
&lt;BR /&gt;
Defining a Hex 00 in SAS could look like '00'x -&amp;gt; compress(CRED_CUST_NO,'00'x);&lt;BR /&gt;
&lt;BR /&gt;
You can of course use one of the modifiers to compress a whole group of HEX values.&lt;BR /&gt;
&lt;BR /&gt;
I don't really understand why you're not already applying your conversion as an expression in the table mapping section of the file reader.&lt;BR /&gt;
&lt;BR /&gt;
From a puristic point of view:&lt;BR /&gt;
It's kind of disturbing that you can't map the variables already in it's correct format when reading from source. &lt;BR /&gt;
&lt;BR /&gt;
I think I personally would pre-process the file in a pre-step (or have such a requirement for the ones delivering the file) and only then use the External file object to read and map the data.&lt;BR /&gt;
&lt;BR /&gt;
Cheers&lt;BR /&gt;
Patrick</description>
    <pubDate>Wed, 24 Mar 2010 13:11:18 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2010-03-24T13:11:18Z</dc:date>
    <item>
      <title>Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70013#M15152</link>
      <description>HI,&lt;BR /&gt;
 &lt;BR /&gt;
While creating the SAS DI jobs to read the data from external files and to populate the SAS datastes we are facing the issues below…&lt;BR /&gt;
 &lt;BR /&gt;
1.	Trialing blanks replaced with junk values for characteristic columns&lt;BR /&gt;
2.	When we use informat as s370fpdw. for Numerical columns that allow null values, SAS throws an error saying invalid data for such columns. For time being we have overridden the system option “ERRORS =” to skip the errors.&lt;BR /&gt;
 &lt;BR /&gt;
We have used ftp access method to read the data from external files exist in Z/OS.&lt;BR /&gt;
 &lt;BR /&gt;
We have been creating the SAS DI jobs in the windows environment to read the files exist in Z/OS environment. As you know we should convert the ebcdic data into ascii data since we create the jobs in windows environment.&lt;BR /&gt;
 &lt;BR /&gt;
You may refer the external file structure below…&lt;BR /&gt;
 &lt;BR /&gt;
000001   LOAD DATA LOG NO INDDN SYSREC00 INTO TABLE                         &lt;BR /&gt;
000002       SCHEMA.BS_MANDATE                                                &lt;BR /&gt;
000003    (                                                                 &lt;BR /&gt;
000004    BS_MANDATE_NO                          POSITION(       1:       6)&lt;BR /&gt;
000005    DECIMAL                              ,                            &lt;BR /&gt;
000006    CRED_CG_ID                             POSITION(       7:      12)&lt;BR /&gt;
000007    DECIMAL                              ,                            &lt;BR /&gt;
000008    CRED_CUST_NO                           POSITION(      13         )&lt;BR /&gt;
000009    VARCHAR                              ,                            &lt;BR /&gt;
000010    DBTR_NO                                POSITION(      45:      50)&lt;BR /&gt;
000011    DECIMAL                              ,                            &lt;BR /&gt;
000012    DBTR_ACCT_CATEGORY_ID                  POSITION(      51:      56)&lt;BR /&gt;
000013    DECIMAL                              ,                            &lt;BR /&gt;
000014    DBTR_REG_NO                            POSITION(      57:      59)&lt;BR /&gt;
000015    DECIMAL                              ,                            &lt;BR /&gt;
000016    DBTR_ACCT_NO                           POSITION(      60:      65)&lt;BR /&gt;
000017    DECIMAL                              ,                            &lt;BR /&gt;
000018    DBTR_IBAN_NO                           POSITION(      66         )&lt;BR /&gt;
000019    VARCHAR                                                           &lt;BR /&gt;
000020         NULLIF(     102)='?',                                        &lt;BR /&gt;
&lt;B&gt;000021    DELV_ID                                POSITION(     103:     108)&lt;BR /&gt;
000022    DECIMAL                                                           &lt;BR /&gt;
000023         NULLIF(     109)='?',&lt;/B&gt;                                        &lt;BR /&gt;
000024    CREATED_BY                             POSITION(     110         )&lt;BR /&gt;
000025    CHAR(                      4)                                     &lt;BR /&gt;
000026         NULLIF(     114)='?',                                        &lt;BR /&gt;
000027    REPORTING_IDENT                        POSITION(     115         )&lt;BR /&gt;
000028    VARCHAR                                                           &lt;BR /&gt;
000029         NULLIF(     133)='?',                                        &lt;BR /&gt;
000030    START_DT                               POSITION(     134         )&lt;BR /&gt;
000031    DATE EXTERNAL(            10)        ,                            &lt;BR /&gt;
000032    VAL_START_DT                           POSITION(     144         )&lt;BR /&gt;
000033    DATE EXTERNAL(            10)        ,                            &lt;BR /&gt;
000034    VAL_END_DT                             POSITION(     154         )&lt;BR /&gt;
000035    DATE EXTERNAL(            10)        ,                            &lt;BR /&gt;
000036    UPDATE_BY                              POSITION(     164         )&lt;BR /&gt;
000037    VARCHAR                              ,                            &lt;BR /&gt;
000038    UPDATE_TS                              POSITION(     206         )&lt;BR /&gt;
000039    TIMESTAMP EXTERNAL(       26)                                     &lt;BR /&gt;
000040    )                                                                 &lt;BR /&gt;
 &lt;BR /&gt;
Please refer the code below that the SAS DI job has been generated.&lt;BR /&gt;
 &lt;BR /&gt;
data work.etls_W5TR1SOO; &lt;BR /&gt;
 &lt;BR /&gt;
   infile "'A1.Z00D.ML1. MUNL02.D100219'" Ftp Host='HOST' Port=2&lt;BR /&gt;
          firstobs = 1&lt;BR /&gt;
          BInary RECFM=F lrecl=231 blocksize=32000 debug USER='Use12r' PASS='{sasenc}2232812D2927A8E029DA';&lt;BR /&gt;
 &lt;BR /&gt;
   attrib BS_MANDATE_NO length = 6 informat = s370fpd6.; &lt;BR /&gt;
   attrib CRED_CG_ID length = 6 informat = s370fpd6.; &lt;BR /&gt;
   attrib CRED_CUST_NO length = $32 informat = $ebcdic32.; &lt;BR /&gt;
   attrib DBTR_NO length = 6 informat = s370fpd6.; &lt;BR /&gt;
   attrib DBTR_ACCT_CATEGORY_ID length = 6 informat = s370fpd6.; &lt;BR /&gt;
   attrib DBTR_REG_NO length = 3 informat = s370fpd3.; &lt;BR /&gt;
   attrib DBTR_ACCT_NO length = 6 informat = s370fpd6.; &lt;BR /&gt;
   attrib DBTR_IBAN_NO length = $36 informat = $ebcdic36.; &lt;BR /&gt;
   attrib NULL_IF_IBAN length = $1 informat = $ebcdic1.; &lt;BR /&gt;
&lt;B&gt;   attrib DELV_ID length = 6 informat = s370fpd6.; &lt;BR /&gt;
   attrib NULL_IF_DELV length = $1 informat = $ebcdic1.;&lt;/B&gt; &lt;BR /&gt;
   attrib CREATED_BY length = $4 informat = $ebcdic4.; &lt;BR /&gt;
   attrib NUL_IF_2 length = $1 informat = $ebcdic1.; &lt;BR /&gt;
   attrib REPORTING_IDENT length = $16 informat = $ebcdic18.; &lt;BR /&gt;
   attrib NULL_IF_ID length = $1 informat = $ebcdic1.; &lt;BR /&gt;
   attrib START_DT length = $10 informat = $ebcdic10.; &lt;BR /&gt;
   attrib VAL_START_DT length = $10 informat = $ebcdic10.; &lt;BR /&gt;
   attrib VAL_END_DT length = $10 informat = $ebcdic10.; &lt;BR /&gt;
   attrib UPDATE_BY length = $42 informat = $ebcdic42.; &lt;BR /&gt;
   attrib UPDATE_TS length = $26 informat = $ebcdic26.; &lt;BR /&gt;
 &lt;BR /&gt;
   input @ 1 BS_MANDATE_NO  s370fpd6.&lt;BR /&gt;
          @ 7 CRED_CG_ID  s370fpd6.&lt;BR /&gt;
          @ 13 CRED_CUST_NO  $ebcdic32.&lt;BR /&gt;
          @ 45 DBTR_NO  s370fpd6.&lt;BR /&gt;
          @ 51 DBTR_ACCT_CATEGORY_ID  s370fpd6.&lt;BR /&gt;
          @ 57 DBTR_REG_NO  s370fpd3.&lt;BR /&gt;
          @ 60 DBTR_ACCT_NO  s370fpd6.&lt;BR /&gt;
          @ 66 DBTR_IBAN_NO  $ebcdic36.&lt;BR /&gt;
          @ 102 NULL_IF_IBAN  $ebcdic1.&lt;BR /&gt;
    &lt;B&gt;      @ 103 DELV_ID  $ebcdic6.&lt;BR /&gt;
          @ 109 NULL_IF_DELV  $ebcdic1&lt;/B&gt;.&lt;BR /&gt;
          @ 110 CREATED_BY  $ebcdic4.&lt;BR /&gt;
          @ 114 NUL_IF_2  $ebcdic1.&lt;BR /&gt;
          @ 117 REPORTING_IDENT  $ebcdic18.&lt;BR /&gt;
          @ 133 NULL_IF_ID  $ebcdic1.&lt;BR /&gt;
          @ 134 START_DT  $ebcdic10.&lt;BR /&gt;
          @ 144 VAL_START_DT  $ebcdic10.&lt;BR /&gt;
          @ 154 VAL_END_DT  $ebcdic10.&lt;BR /&gt;
          @ 164 UPDATE_BY  $ebcdic42.&lt;BR /&gt;
          @ 206 UPDATE_TS  $ebcdic26.; &lt;BR /&gt;
 &lt;BR /&gt;
run;&lt;BR /&gt;
 &lt;BR /&gt;
When we view data from SAS dataset, it displays data for characteristic columns properly, but when we tried to print data using the proc print option; we come to know the issue that trailing blanks are replaced with junk values for characteristic columns.&lt;BR /&gt;
 &lt;BR /&gt;
There is a field named DELV_ID defined as numeric and it allows nulls, we use the informat as s370fpd6. As we did for other numerical columns, but when we run the job, it throws an error saying invalid data, since z/os dataset replaced nulls with “?”&lt;BR /&gt;
 &lt;BR /&gt;
You may refer the generated log below…&lt;BR /&gt;
 &lt;BR /&gt;
&lt;B&gt;NOTE: Invalid data for DELV_ID in line 16 103-108.&lt;/B&gt;&lt;BR /&gt;
 &lt;BR /&gt;
16  CHAR  .....&amp;lt;... .L..èÄäððððððððððñù.................7sPœ........\..R9W\...........................&lt;BR /&gt;
    ZONE  00001300021400ECEFFFFFFFFFFFF000000000000000093759000001005005355000000000000000000000000000&lt;BR /&gt;
    NUMR  00007C00001C0F84400000000001900000000000000010730C00000C31C00297C000000000000000000000000000&lt;BR /&gt;
 &lt;BR /&gt;
      93  .........o......oÃÙÅÄ...................oðñKðöKòððùðñKðöKòððùóñKñòKùùùù..¦—¢.„”‰•kÂ×mðòõkâÃÅ&lt;BR /&gt;
    ZONE  00000000060000006CDCC00000000000000000006FF4FF4FFFFFF4FF4FFFFFF4FF4FFFF01A9A889896CD6FFF6ECC&lt;BR /&gt;
    NUMR  000000000F000000F39540000000000000000000F01B06B200901B06B200931B12B99990367214495B27D025B235&lt;BR /&gt;
 &lt;BR /&gt;
     185  .....................òððù`ðô`òô`ñóKôôKõõK÷ö÷ððð&lt;BR /&gt;
    ZONE  000000000000000000000FFFF6FF6FF6FF4FF4FF4FFFFFF&lt;BR /&gt;
    NUMR  0000000000000000000002009004024013B44B55B767000&lt;BR /&gt;
BS_MANDATE_NO=173 CRED_CG_ID=20114 CRED_CUST_NO= _YDU000000000019                DBTR_NO=1903773509&lt;BR /&gt;
DBTR_ACCT_CATEGORY_ID=1 DBTR_REG_NO=3015 DBTR_ACCT_NO=5239575&lt;BR /&gt;
DBTR_IBAN_NO=                                     NULL_IF_IBAN=? DELV_ID=. NULL_IF_DELV=?&lt;BR /&gt;
CREATED_BY=CRED NUL_IF_2=  REPORTING_IDENT=                 NULL_IF_ID=? START_DT=01.06.2009&lt;BR /&gt;
VAL_START_DT=01.06.2009 VAL_END_DT=31.12.9999 UPDATE_BY= _wpsadmin,BP_025,SCE&lt;BR /&gt;
UPDATE_TS=2009-04-24-13.44.55.767000 _ERROR_=1 _N_=16&lt;BR /&gt;
&lt;B&gt;NOTE: Invalid data for DELV_ID in line 18 103-108.&lt;/B&gt;&lt;BR /&gt;
 &lt;BR /&gt;
18  CHAR  .....\... .&amp;lt;..ðøð÷ùððððñððù÷ð...................&amp;amp;\........œ.....\...........................&lt;BR /&gt;
    ZONE  00001500020300FFFFFFFFFFFFFFF000000000000000011025000001009000005000000000000000000000000000&lt;BR /&gt;
    NUMR  00007C00001C0F08079000010097000000000000000000006C00000C87C00109C000000000000000000000000000&lt;BR /&gt;
 &lt;BR /&gt;
      93  .........o......oÃÙÅÄ...................oðñKðõKòððùðñKðõKòððùóñKñòKùùùù..¦—¢.„”‰•kÂ×mðòõkâÃÅ&lt;BR /&gt;
    ZONE  00000000060000006CDCC00000000000000000006FF4FF4FFFFFF4FF4FFFFFF4FF4FFFF01A9A889896CD6FFF6ECC&lt;BR /&gt;
    NUMR  000000000F000000F39540000000000000000000F01B05B200901B05B200931B12B99990367214495B27D025B235&lt;BR /&gt;
 &lt;BR /&gt;
     185  .....................òððù`ðô`ñô`ññKñùKõôKøöðððð&lt;BR /&gt;
    ZONE  000000000000000000000FFFF6FF6FF6FF4FF4FF4FFFFFF&lt;BR /&gt;
    NUMR  0000000000000000000002009004014011B19B54B860000&lt;BR /&gt;
BS_MANDATE_NO=175 CRED_CG_ID=20013 CRED_CUST_NO= _080790000100970                DBTR_NO=101000265&lt;BR /&gt;
DBTR_ACCT_CATEGORY_ID=1 DBTR_REG_NO=8079 DBTR_ACCT_NO=100095&lt;BR /&gt;
DBTR_IBAN_NO=                                     NULL_IF_IBAN=? DELV_ID=. NULL_IF_DELV=?&lt;BR /&gt;
CREATED_BY=CRED NUL_IF_2=  REPORTING_IDENT=                 NULL_IF_ID=? START_DT=01.05.2009&lt;BR /&gt;
VAL_START_DT=01.05.2009 VAL_END_DT=31.12.9999 UPDATE_BY= _wpsadmin,BP_025,SCE&lt;BR /&gt;
UPDATE_TS=2009-04-14-11.19.54.860000 _ERROR_=1 _N_=18&lt;BR /&gt;
NOTE: Invalid data for DELV_ID in line 19 103-108.&lt;BR /&gt;
 &lt;BR /&gt;
19  CHAR  .....l... .&amp;lt;..ðøð÷ùððððñððùöò.................d …|........œ.... ,...........................&lt;BR /&gt;
    ZONE  00001600020300FFFFFFFFFFFFFFF000000000000000006287000001009000022000000000000000000000000000&lt;BR /&gt;
    NUMR  00007C00001C0F08079000010096200000000000000010405C00000C87C00100C000000000000000000000000000&lt;BR /&gt;
 &lt;BR /&gt;
      93  .........o......oÃÙÅÄ...................oðñKðõKòððùðñKðõKòððùóñKñòKùùùù..¦—¢.„”‰•kÂ×mðòõkâÃÅ&lt;BR /&gt;
    ZONE  00000000060000006CDCC00000000000000000006FF4FF4FFFFFF4FF4FFFFFF4FF4FFFF01A9A889896CD6FFF6ECC&lt;BR /&gt;
    NUMR  000000000F000000F39540000000000000000000F01B05B200901B05B200931B12B99990367214495B27D025B235&lt;BR /&gt;
 &lt;BR /&gt;
     185  .....................òððù`ðô`ñô`ññKòõKñòKùù÷ððð&lt;BR /&gt;
    ZONE  000000000000000000000FFFF6FF6FF6FF4FF4FF4FFFFFF&lt;BR /&gt;
    NUMR  0000000000000000000002009004014011B25B12B997000&lt;BR /&gt;
BS_MANDATE_NO=176 CRED_CG_ID=20013 CRED_CUST_NO= _080790000100962                DBTR_NO=1006420857&lt;BR /&gt;
DBTR_ACCT_CATEGORY_ID=1 DBTR_REG_NO=8079 DBTR_ACCT_NO=100202&lt;BR /&gt;
DBTR_IBAN_NO=                                     NULL_IF_IBAN=? DELV_ID=. NULL_IF_DELV=?&lt;BR /&gt;
CREATED_BY=CRED NUL_IF_2=  REPORTING_IDENT=                 NULL_IF_ID=? START_DT=01.05.2009&lt;BR /&gt;
VAL_START_DT=01.05.2009 VAL_END_DT=31.12.9999 UPDATE_BY= _wpsadmin,BP_025,SCE&lt;BR /&gt;
UPDATE_TS=2009-04-14-11.25.12.997000 _ERROR_=1 _N_=19&lt;BR /&gt;
NOTE: Invalid data for DELV_ID in line 20 103-108.&lt;BR /&gt;
 &lt;BR /&gt;
20  CHAR  .....|... .l..ççÑððððððððððñø................A.aBœ........œ....)&amp;lt;...........................&lt;BR /&gt;
    ZONE  00001700020600EEDFFFFFFFFFFFF000000000000000041649000001009000023000000000000000000000000000&lt;BR /&gt;
    NUMR  00007C00009C0F77100000000001800000000000000021012C00000C87C00109C000000000000000000000000000&lt;BR /&gt;
 &lt;BR /&gt;
      93  .........o......oÃÙÅÄ...................oðñKðöKòððùðñKðöKòððùóñKñòKùùùù..¦—¢.„”‰•kÂ×mðòõkâÃÅ&lt;BR /&gt;
    ZONE  00000000060000006CDCC00000000000000000006FF4FF4FFFFFF4FF4FFFFFF4FF4FFFF01A9A889896CD6FFF6ECC&lt;BR /&gt;
    NUMR  000000000F000000F39540000000000000000000F01B06B200901B06B200931B12B99990367214495B27D025B235&lt;BR /&gt;
 &lt;BR /&gt;
     185  .....................òððù`ðô`ò÷`ñôKñõKõöKôóùððð&lt;BR /&gt;
    ZONE  000000000000000000000FFFF6FF6FF6FF4FF4FF4FFFFFF&lt;BR /&gt;
    NUMR  0000000000000000000002009004027014B15B56B439000&lt;BR /&gt;
BS_MANDATE_NO=177 CRED_CG_ID=20096 CRED_CUST_NO= _XXJ000000000018                DBTR_NO=2411061429&lt;BR /&gt;
DBTR_ACCT_CATEGORY_ID=1 DBTR_REG_NO=8079 DBTR_ACCT_NO=100293&lt;BR /&gt;
DBTR_IBAN_NO=                                     NULL_IF_IBAN=? DELV_ID=. NULL_IF_DELV=?&lt;BR /&gt;
CREATED_BY=CRED NUL_IF_2=  REPORTING_IDENT=                 NULL_IF_ID=? START_DT=01.06.2009&lt;BR /&gt;
VAL_START_DT=01.06.2009 VAL_END_DT=31.12.9999 UPDATE_BY= _wpsadmin,BP_025,SCE&lt;BR /&gt;
UPDATE_TS=2009-04-27-14.15.56.439000 _ERROR_=1 _N_=20&lt;BR /&gt;
NOTE: Invalid data for DELV_ID in line 21 103-108.&lt;BR /&gt;
 &lt;BR /&gt;
21  CHAR  .....Œ... .œ..ççÑððððððððððóô................pv.)&amp;lt;........œ....d............................&lt;BR /&gt;
    ZONE  00001800020900EEDFFFFFFFFFFFF000000000000000077123000001009000060000000000000000000000000000&lt;BR /&gt;
    NUMR  00007C00001C0F77100000000003400000000000000000649C00000C87C00104C000000000000000000000000000&lt;BR /&gt;
 &lt;BR /&gt;
      93  .........o......oÃÙÅÄ...................oðñKðöKòððùðñKðöKòððùóñKñòKùùùù..¦—¢.„”‰•kÂ×mðòõkâÃÅ&lt;BR /&gt;
    ZONE  00000000060000006CDCC00000000000000000006FF4FF4FFFFFF4FF4FFFFFF4FF4FFFF01A9A889896CD6FFF6ECC&lt;BR /&gt;
    NUMR  000000000F000000F39540000000000000000000F01B06B200901B06B200931B12B99990367214495B27D025B235&lt;BR /&gt;
 &lt;BR /&gt;
 &lt;BR /&gt;
 &lt;BR /&gt;
 &lt;BR /&gt;
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9--&lt;BR /&gt;
 &lt;BR /&gt;
     185  .....................òððù`ðô`ò÷`ñ÷KôøKôðKøñùððð&lt;BR /&gt;
    ZONE  000000000000000000000FFFF6FF6FF6FF4FF4FF4FFFFFF&lt;BR /&gt;
    NUMR  0000000000000000000002009004027017B48B40B819000&lt;BR /&gt;
BS_MANDATE_NO=178 CRED_CG_ID=20019 CRED_CUST_NO= _XXJ000000000034                DBTR_NO=707614293&lt;BR /&gt;
DBTR_ACCT_CATEGORY_ID=1 DBTR_REG_NO=8079 DBTR_ACCT_NO=100640&lt;BR /&gt;
DBTR_IBAN_NO=                                     NULL_IF_IBAN=? DELV_ID=. NULL_IF_DELV=?&lt;BR /&gt;
CREATED_BY=CRED NUL_IF_2=  REPORTING_IDENT=                 NULL_IF_ID=? START_DT=01.06.2009&lt;BR /&gt;
VAL_START_DT=01.06.2009 VAL_END_DT=31.12.9999 UPDATE_BY= _wpsadmin,BP_025,SCE&lt;BR /&gt;
UPDATE_TS=2009-04-27-17.48.40.819000 _ERROR_=1 _N_=21&lt;BR /&gt;
NOTE: Invalid data for DELV_ID in line 22 103-108.&lt;BR /&gt;
 &lt;BR /&gt;
22  CHAR  .....œ... .œ..ççÑððððððððððóõ...................e&amp;lt;........\.....|...........................&lt;BR /&gt;
    ZONE  00001900020900EEDFFFFFFFFFFFF000000000000000000063000001005001007000000000000000000000000000&lt;BR /&gt;
    NUMR  00007C00001C0F77100000000003500000000000000001005C00000C31C00004C000000000000000000000000000&lt;BR /&gt;
 &lt;BR /&gt;
      93  .........o......oÃÄÅÂ...................oðñKðöKòððùðñKðöKòððùóñKñòKùùùù..¦—¢.„”‰•kÂ×mðòõkâÃÅ&lt;BR /&gt;
    ZONE  00000000060000006CCCC00000000000000000006FF4FF4FFFFFF4FF4FFFFFF4FF4FFFF01A9A889896CD6FFF6ECC&lt;BR /&gt;
    NUMR  000000000F000000F34520000000000000000000F01B06B200901B06B200931B12B99990367214495B27D025B235&lt;BR /&gt;
 &lt;BR /&gt;
     185  .....................òððù`ðô`ò÷`ñ÷KõñKóøKøðøððð&lt;BR /&gt;
    ZONE  000000000000000000000FFFF6FF6FF6FF4FF4FF4FFFFFF&lt;BR /&gt;
    NUMR  0000000000000000000002009004027017B51B38B808000&lt;BR /&gt;
BS_MANDATE_NO=179 CRED_CG_ID=20019 CRED_CUST_NO= _XXJ000000000035                DBTR_NO=10000653&lt;BR /&gt;
DBTR_ACCT_CATEGORY_ID=1 DBTR_REG_NO=3015 DBTR_ACCT_NO=1000047&lt;BR /&gt;
DBTR_IBAN_NO=                                     NULL_IF_IBAN=? DELV_ID=. NULL_IF_DELV=?&lt;BR /&gt;
CREATED_BY=CDEB NUL_IF_2=  REPORTING_IDENT=                 NULL_IF_ID=? START_DT=01.06.2009&lt;BR /&gt;
VAL_START_DT=01.06.2009 VAL_END_DT=31.12.9999 UPDATE_BY= _wpsadmin,BP_025,SCE&lt;BR /&gt;
UPDATE_TS=2009-04-27-17.51.38.808000 _ERROR_=1 _N_=22&lt;BR /&gt;
NOTE: Invalid data for DELV_ID in line 23 103-108.&lt;BR /&gt;
ERROR: Limit set by ERRORS= option reached.  Further errors of this type will not be printed.&lt;BR /&gt;
 &lt;BR /&gt;
23  CHAR  ......... .L..ççÑððððððððððóù...................VL........œ....f\...........................&lt;BR /&gt;
    ZONE  00001000020400EEDFFFFFFFFFFFF000000000000000000054000001009000065000000000000000000000000000&lt;BR /&gt;
    NUMR  00008C00002C0F77100000000003900000000000000001006C00000C87C00106C000000000000000000000000000&lt;BR /&gt;
 &lt;BR /&gt;
      93  .........o......oÃÄÅÂ...................oðñKðöKòððùðñKðöKòððùóñKñòKùùùù..¦—¢.„”‰•kÂ×mðòõkâÃÅ&lt;BR /&gt;
    ZONE  00000000060000006CCCC00000000000000000006FF4FF4FFFFFF4FF4FFFFFF4FF4FFFF01A9A889896CD6FFF6ECC&lt;BR /&gt;
    NUMR  000000000F000000F34520000000000000000000F01B06B200901B06B200931B12B99990367214495B27D025B235&lt;BR /&gt;
 &lt;BR /&gt;
     185  .....................òððù`ðô`ò÷`ñøKðñKñ÷Kù÷õððð&lt;BR /&gt;
    ZONE  000000000000000000000FFFF6FF6FF6FF4FF4FF4FFFFFF&lt;BR /&gt;
    NUMR  0000000000000000000002009004027018B01B17B975000&lt;BR /&gt;
BS_MANDATE_NO=180 CRED_CG_ID=20024 CRED_CUST_NO= _XXJ000000000039                DBTR_NO=10000564&lt;BR /&gt;
DBTR_ACCT_CATEGORY_ID=1 DBTR_REG_NO=8079 DBTR_ACCT_NO=100665&lt;BR /&gt;
DBTR_IBAN_NO=                                     NULL_IF_IBAN=? DELV_ID=. NULL_IF_DELV=?&lt;BR /&gt;
CREATED_BY=CDEB NUL_IF_2=  REPORTING_IDENT=                 NULL_IF_ID=? START_DT=01.06.2009&lt;BR /&gt;
VAL_START_DT=01.06.2009 VAL_END_DT=31.12.9999 UPDATE_BY= _wpsadmin,BP_025,SCE&lt;BR /&gt;
UPDATE_TS=2009-04-27-18.01.17.975000 _ERROR_=1 _N_=23&lt;BR /&gt;
NOTE: &amp;lt;&amp;lt;&amp;lt; 250 Transfer completed successfully.&lt;BR /&gt;
NOTE: &amp;gt;&amp;gt;&amp;gt; QUIT&lt;BR /&gt;
NOTE: 53 records were read from the infile "'A1.Z00D.ML1. MUNL02.D100219'".&lt;BR /&gt;
NOTE: The data set WORK.W5TR1SOO has 53 observations and 20 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.73 seconds&lt;BR /&gt;
      cpu time            0.20 seconds&lt;BR /&gt;
 &lt;BR /&gt;
 &lt;BR /&gt;
For time being we have overridden the default system option ERRORS = 20 as ERRORS = 100; in the pre processor, but we worried that this option may skip other valid errors.&lt;BR /&gt;
 &lt;BR /&gt;
Could you please help us to resolve the above issues?&lt;BR /&gt;
 &lt;BR /&gt;
Kindly revert, if you need more details…&lt;BR /&gt;
 &lt;BR /&gt;
Thanks and Regards,&lt;BR /&gt;
AnjiReddy.</description>
      <pubDate>Mon, 22 Mar 2010 05:14:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70013#M15152</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-22T05:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70014#M15153</link>
      <description>Hi AnjiReddy.&lt;BR /&gt;
&lt;BR /&gt;
I'm actually quite amazed that "External Files" even work with z\OS - and I like the code generated.&lt;BR /&gt;
&lt;BR /&gt;
I can see that the raw data is transferred via ftp binary mode so that the EBCDIC/ASCII translation happens in the target system.&lt;BR /&gt;
&lt;BR /&gt;
It looks to me as if blanks are not converted correctly. It might still look good in a viewer when blanks are translated to some whitespace character. But as it is not a blank informats will most likely treat this whitespace value different when reading (i.e. as invalide numeric value).&lt;BR /&gt;
&lt;BR /&gt;
First I would check how the values are stored in the target system. Are they really blanks on the mainfraime (I believe this would be HEX04)?&lt;BR /&gt;
&lt;BR /&gt;
If they are blank in the source (EBCDIC Hex04): Something with the translation must go wrong. Translation tables come to mind (trantab option, proc trantab).&lt;BR /&gt;
&lt;BR /&gt;
You might have to investigate what translation tables are used in your target system and if they are correct. As your name doesn't sound American there might be some issues with the National Language Settings (I had already a lot of "fun" with this...).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If you're using SAS9.2 AND it's only about blanks AND you need a quick and dirty solution:&lt;BR /&gt;
&lt;BR /&gt;
The FileReader in DIS4.2 gives you this possibility to add aditional options to the infile statement. What one could do is to "inject" here a piece of code in the following way:&lt;BR /&gt;
&lt;BR /&gt;
;    /* this ends the infile statement */&lt;BR /&gt;
input @;&lt;BR /&gt;
_infile_=translate(_infile_,' ','&lt;LIST garbadge="" characters=""&gt;');&lt;BR /&gt;
&lt;BR /&gt;
/* and after this DIS will generate the input statement now mapping to the already prepared input buffer */&lt;BR /&gt;
&lt;BR /&gt;
The list of garbadge characters should be in it's hex representation as you get them currently in your variables. &lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick&lt;/LIST&gt;</description>
      <pubDate>Mon, 22 Mar 2010 10:07:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70014#M15153</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-03-22T10:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70015#M15154</link>
      <description>I see some inconsistencies with your selectively pasted SAS program code -- you have declared a SAS numeric variable however you are attempting to use a CHARACTER type INFORMAT.&lt;BR /&gt;
&lt;BR /&gt;
I suggest you FTP binary transfer a complete data file then analyze the field/column as a SAS CHARACTER variable using PROC FREQ.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 22 Mar 2010 12:50:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70015#M15154</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-22T12:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70016#M15155</link>
      <description>I missed this numeric/character inconsistency which Scott mentions.&lt;BR /&gt;
&lt;BR /&gt;
This is sure the very first step of investigation and has to be consistent before you even start looking further.&lt;BR /&gt;
&lt;BR /&gt;
Cheers&lt;BR /&gt;
Patrick</description>
      <pubDate>Mon, 22 Mar 2010 13:20:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70016#M15155</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-03-22T13:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70017#M15156</link>
      <description>Also, the info you shared about your "external file structure" also conflicts with the SAS-default INFORMAT (on the ATTRIB statement) - you show a mainframe packed-decimal INFORMAT S370PDw. being used however your supplemental info shows DECIMAL and not "DECIMAL PACKED".  &lt;BR /&gt;
&lt;BR /&gt;
Also, you might want to desk-check how SAS will interpret a NULL value in the numeric type data field -- you can expect to receive NOTE condition with INVALID DATA (similar to below) when you have a packed-decimal (interpreted) field with a hex-zero (null) content.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1    data _null_;&lt;BR /&gt;
2    x = input('00000000'x,s370fpd4.);&lt;BR /&gt;
3    putlog '&amp;gt;diag1&amp;gt;' / _all_;&lt;BR /&gt;
4    x = input('0000000F'x,s370fpd4.);&lt;BR /&gt;
5    putlog '&amp;gt;diag2&amp;gt;' / _all_;&lt;BR /&gt;
6    x = input('00000000'x,?? s370fpd4.);&lt;BR /&gt;
7    putlog '&amp;gt;diag3&amp;gt;' / _all_;&lt;BR /&gt;
8    run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Invalid argument to function INPUT at line 2 column 5.&lt;BR /&gt;
&amp;gt;diag1&amp;gt;&lt;BR /&gt;
x=. _ERROR_=1 _N_=1&lt;BR /&gt;
&amp;gt;diag2&amp;gt;&lt;BR /&gt;
x=0 _ERROR_=1 _N_=1&lt;BR /&gt;
&amp;gt;diag3&amp;gt;&lt;BR /&gt;
x=. _ERROR_=1 _N_=1&lt;BR /&gt;
x=. _ERROR_=1 _N_=1&lt;BR /&gt;
NOTE: Mathematical operations could not be performed at the following places. The results of the&lt;BR /&gt;
      operations have been set to missing values.&lt;BR /&gt;
      Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;
      1 at 2:5&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds</description>
      <pubDate>Mon, 22 Mar 2010 15:44:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70017#M15156</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-22T15:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70018#M15157</link>
      <description>I assume the load data statements are working and correct. &lt;BR /&gt;
Following Scott's lead I understand that for DECIMAL the appropriate informat would be S370FFw.d (http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a000195467.htm).&lt;BR /&gt;
&lt;BR /&gt;
Also you're writing that "...throws an error saying invalid data, since z/os dataset replaced nulls with “?”..."&lt;BR /&gt;
Looking up what  NULLIF( 109)='?' does I would expect that a '?' in column 109 is converted to NULL - and not the other way round (http://publib.boulder.ibm.com/infocenter/rbhelp/v6r3/index.jsp?topic=/com.ibm.redbrick.doc6.3/sqlrg/sqlrg31.htm)&lt;BR /&gt;
&lt;BR /&gt;
I don't understand why you're mapping all these "Null_If..." fields. Is there any information in it you need?&lt;BR /&gt;
&lt;BR /&gt;
Suspicious to me looks that DELV_ID has a length=6 in the attrib statement. &lt;BR /&gt;
As a length value for a numeric variable in SAS is not the length of the string to be read but how many bites are used to store a number I assume this definition should be changed. Length should most likely be 8 for all numeric variables.&lt;BR /&gt;
&lt;BR /&gt;
The HEX00 issue still remains. &lt;BR /&gt;
The only ideas I have in the moment is to either use this "injection" approach and convert all HEX00 to ASCII blanks before mapping the vars - or to define the external file as user written and then use an input statement in the form  &lt;BR /&gt;
input @103 DELV_ID ?? s370ff6. ;&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
      <pubDate>Mon, 22 Mar 2010 18:40:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70018#M15157</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-03-22T18:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70019#M15158</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Thanx a ton for such great responses to the issues posted above.&lt;BR /&gt;
&lt;BR /&gt;
I am sorry as I missed to replace the DELV_ID type as s370fpd6. instead of $ebcdic6.&lt;BR /&gt;
&lt;BR /&gt;
I wanted to bring your notice that SAS generates a warning below when we use the informat value as s370fpdw. but it reads the data properly.&lt;BR /&gt;
&lt;BR /&gt;
WARNING 150-185: List input (implied by INFORMAT) is incompatible with the specified binary informat. Formatted input will be used.&lt;BR /&gt;
&lt;BR /&gt;
I tried to read DELV_ID as char and in the next process tried to convert into numeric but it isn't working. Would be great if you can tell me how it works so we can avoid customizing the file reader transformation code.&lt;BR /&gt;
&lt;BR /&gt;
Actually our mainframe team uses the unloaded utilities to pull the data from DB2 table reside on Z/OS. And the file structure been generated by utilities automatically. Naturally we refer the file structure to define the source metadata but it isn't working as expected. Ultimately the unloaded data is in packed decimal format only.&lt;BR /&gt;
&lt;BR /&gt;
However as Patrick said we have used the code @103 DELV_ID ?? s370fpd6. by selecting user written option to override the file reader transformation code. And it works fine.&lt;BR /&gt;
&lt;BR /&gt;
When it comes to characteristic columns, I see the source data having HEX00 values. This is happening with columns defined as VARCHAR not with the columns defined as CHAR. Though there are no leading spaces in the DB2 tables for the columns defined as VARCHAR utilities fill the data with HEX00 for in the first 2 positions. It seems, something worng with utilities. I will check with our mainframe experts.&lt;BR /&gt;
&lt;BR /&gt;
We have to use "Null If" variable to replace the nulls with blanks and dots. It is the practice we have been followed in our BI environment.&lt;BR /&gt;
&lt;BR /&gt;
Thanks once again...&lt;BR /&gt;
Warm Regards,&lt;BR /&gt;
AnjiREDDY.</description>
      <pubDate>Tue, 23 Mar 2010 09:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70019#M15158</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-23T09:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70020#M15159</link>
      <description>First, did you analyze all values of the field (in SAS, using PROC FREQ) as a SAS CHARACTER variable, so that you could learn about all incoming values?&lt;BR /&gt;
&lt;BR /&gt;
Also, the latest  "...not working.." comment requires sharing your code that is not working, ideally as part of a post-reply pasted from your log for the best forum subscriber response:&lt;BR /&gt;
&lt;BR /&gt;
"I tried to read DELV_ID as char and in the next process tried to convert into numeric but it isn't working. Would be great if you can tell me how it works so we can avoid customizing the file reader transformation code."&lt;BR /&gt;
&lt;BR /&gt;
And the use of "??" with an INFORMAT simply masks the WARNING message when you have incompatible data-field with the associated INFORMAT.  So, if you are using an INFORMAT that expects to find a non-NULL data field, you should expect to receive the warning.&lt;BR /&gt;
&lt;BR /&gt;
So, post your INPUT function code that is attempting to convert your CHARACTER to NUMERIC -- and share what you have learned about the various data-field strings you find in the DELV_ID when reading up as CHARACTER.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 23 Mar 2010 12:04:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70020#M15159</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-23T12:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70021#M15160</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I haven't analyzed the incoming data using proc freq as I amn't familiar with this procedure.&lt;BR /&gt;
&lt;BR /&gt;
I have defrined the DELV_ID as attrib DELV_ID length = 6 informat = $ebcdic6.; input @ 103 DELV_ID $ebcdic6.;&lt;BR /&gt;
&lt;BR /&gt;
In the next transformation(Data Extract) I have used the expression input(DELV_ID,? 6.) aswell input(DELV_ID,? s370fpd6.). In botht the cases I see no data in the target table for this column.&lt;BR /&gt;
&lt;BR /&gt;
Thanks and Regards,&lt;BR /&gt;
AnjiReddy.</description>
      <pubDate>Tue, 23 Mar 2010 12:31:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70021#M15160</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-23T12:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70022#M15161</link>
      <description>Suggest you double-check how you have declared your SAS variable - you are mixing a CHARACTER type variable and a NUMERIC type INFORMAT -- as discussed previously, this will not work (possibly contributing to your basic problem?)  I expect you have SAS WARNING / NOTE messages in your log which need to be investigated and understood.&lt;BR /&gt;
&lt;BR /&gt;
Also, you will want to take the opportunity to "learn about your incoming data", even if it means stopping what you're doing to analyze various fields in a CHARACTER format, before any attempt is made to convert the data.&lt;BR /&gt;
&lt;BR /&gt;
So, is the field in PACKED_DECIMAL or DECIMAL format?  Are you sure about how you are attempting to read the input file and the field in particular?&lt;BR /&gt;
&lt;BR /&gt;
Again, I strongly encourage you to get a handle on knowing what's coming in -- no one else can help you there!&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 23 Mar 2010 13:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70022#M15161</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-23T13:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70023#M15162</link>
      <description>I am sorry as I haven't copied the code that DI generated.&lt;BR /&gt;
&lt;BR /&gt;
In DI studio I defined the column as char only so it generates the code as below &lt;BR /&gt;
&lt;BR /&gt;
attrib DELV_ID length = $6 informat = $ebcdic6.;&lt;BR /&gt;
input @ 103 DELV_ID $ebcdic6.;&lt;BR /&gt;
&lt;BR /&gt;
I have verified the log file. I dunn see other warning or error messages apart from what I posted in prev post.&lt;BR /&gt;
&lt;BR /&gt;
Yes I agree with you one should know what coming in, I would start knowing about proc freq and analyse the incoming data.&lt;BR /&gt;
&lt;BR /&gt;
I tried to eliminate the junk chars using compress function but it doesn't allow me to use these chars directly, so I have found the ascii values of junk chars using substr and rank functions. And then tried to eliminate such chars using compress function. I am almost succeeded. Please have a look at the code below...&lt;BR /&gt;
&lt;BR /&gt;
CCN = compress(CRED_CUST_NO,byte(0));&lt;BR /&gt;
CCN_NEW = compress(CCN,byte(15));&lt;BR /&gt;
&lt;BR /&gt;
Could you please tell me, how can we achieve the above in single expression?&lt;BR /&gt;
&lt;BR /&gt;
Thanks and Regards,&lt;BR /&gt;
AnjiREDDY.</description>
      <pubDate>Tue, 23 Mar 2010 14:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70023#M15162</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-23T14:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70024#M15163</link>
      <description>Okay, so now we see that the DELV_ID is in fact declared as a CHARACTER variable, not NUMERIC (LENGTH=$6 as compared to LENGTH=6 -- very different behavior).&lt;BR /&gt;
&lt;BR /&gt;
Look at using the TRANSLATE function for your character translation in a SAS assignment statement.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 23 Mar 2010 14:22:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70024#M15163</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-23T14:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70025#M15164</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
using the expression below, one can eliminate all control characters (ascii values with in the range 0..31 considered as control characters)&lt;BR /&gt;
&lt;BR /&gt;
CCN = compress(CRED_CUST_NO, ,'c')&lt;BR /&gt;
&lt;BR /&gt;
Thanks and Regards,&lt;BR /&gt;
AnjiREDDY.</description>
      <pubDate>Wed, 24 Mar 2010 11:17:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70025#M15164</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-24T11:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70026#M15165</link>
      <description>Hi &lt;BR /&gt;
&lt;BR /&gt;
Defining a Hex 00 in SAS could look like '00'x -&amp;gt; compress(CRED_CUST_NO,'00'x);&lt;BR /&gt;
&lt;BR /&gt;
You can of course use one of the modifiers to compress a whole group of HEX values.&lt;BR /&gt;
&lt;BR /&gt;
I don't really understand why you're not already applying your conversion as an expression in the table mapping section of the file reader.&lt;BR /&gt;
&lt;BR /&gt;
From a puristic point of view:&lt;BR /&gt;
It's kind of disturbing that you can't map the variables already in it's correct format when reading from source. &lt;BR /&gt;
&lt;BR /&gt;
I think I personally would pre-process the file in a pre-step (or have such a requirement for the ones delivering the file) and only then use the External file object to read and map the data.&lt;BR /&gt;
&lt;BR /&gt;
Cheers&lt;BR /&gt;
Patrick</description>
      <pubDate>Wed, 24 Mar 2010 13:11:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70026#M15165</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-03-24T13:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties in reading the external file data in ebcdic format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70027#M15166</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I am able to read tthe DELV_ID values without customizing the source code generated by file reader. I have defined the informat as $char6. instead of $ebcdic6. and then used the expression input(DELV_ID, s370fpd6.). It works fine.&lt;BR /&gt;
I thought of using the compress function with modifier Compress(CRED_CUST_No, ,'c')in mapping itself. DI generates the proc SQL, and PRC SQL isn't allowing the modifier.&lt;BR /&gt;
you may refer the log below...&lt;BR /&gt;
&lt;BR /&gt;
2857       proc sql;&lt;BR /&gt;
2858          create table work.W5TR1SOO as&lt;BR /&gt;
2859             select BS_MANDATE_NO length = 6,&lt;BR /&gt;
2860                    CRED_CG_ID length = 6,&lt;BR /&gt;
2861                    (COMPRESS(CRED_CUST_NO, ,'c')) as CRED_CUST_NO length = 32 informat = $ebcdic32.,&lt;BR /&gt;
                                                _&lt;BR /&gt;
                                                22&lt;BR /&gt;
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, &lt;BR /&gt;
              a missing value, BTRIM, INPUT, LOWER, PUT, SUBSTRING, UPPER, USER.&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Any work around to eliminate the control characters using PROC SQL? so I can stop customizing the file reader.&lt;/B&gt;&lt;BR /&gt;
Thanks and Regards,&lt;BR /&gt;
AnjiReddy.</description>
      <pubDate>Thu, 25 Mar 2010 12:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-in-reading-the-external-file-data-in-ebcdic-format/m-p/70027#M15166</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-25T12:00:52Z</dc:date>
    </item>
  </channel>
</rss>

