BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Steelers_In_DC
Barite | Level 11

I am manipulating code I get from using the Enterprise Import feature.  The original code is this:

 

    INFILE '/sas/saswork/SAS_work39CA0000252B_scsmt300a/#LN00017'
        LRECL=467
        ENCODING="LATIN1"
        TERMSTR=CRLF
        DLM='7F'x
        MISSOVER
        DSD ;
    INPUT
        sys              : $CHAR6.
        LOAN_NUMBER      : ?? BEST20.
        LOAN_CLOSING_DATE : ?? YYMMDD8.
        FIRST_PAYMENT_DATE : ?? YYMMDD8.

 

I changed the code to allow for the maximum lengths that the Federal Reserve may provide, I also changed the date to character format.  Here is what I have:

 

INFILE "/sas/user_data/general/sandbox/pp78499/&filename"
        firstobs=2
        LRECL=542
/*        ENCODING="LATIN1"*/
/*        TERMSTR=crlf*/
        DLM='|'
        MISSOVER
        DSD ;
    INPUT

        sys              $CHAR6.
        LOAN_NUMBER      $char33.
        LOAN_CLOSING_DATE $char10.
        FIRST_PAYMENT_DATE $char10.

 

an example of the output is below:

 

ACLShe    |0000000000000000|20040716|200408    15|PA|1908    2|15000|15
ACLShe    |0000000000000000|19990604|199907    10|PA|1932    0|176663|1
ACLShe    |0000000000000000|20010213|200104    05|PA|1913    6|40000|40
ACLShe    |0000000000000000|20010215|200103    20|PA|1903    8|104000|1

 

The pipes are coming into the output, not deliminating the data.  Any help will be appreciated.

 

Thank You,

 

Mark

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19

You need format modifier : colon in the input statement as in the example.

View solution in original post

2 REPLIES 2
data_null__
Jade | Level 19

You need format modifier : colon in the input statement as in the example.

Steelers_In_DC
Barite | Level 11

Ah, if it was a snake it would have bit me.  Thanks!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2471 views
  • 0 likes
  • 2 in conversation