From: GuyA on
I hate reading raw files. Something always (something really
simple...) seems to just not work.

Example of first two lines of text file:

AL|TRANCHE|PARTNER ACCOUNT NUMBER|ACCOUNT NUMBER|NAME|DNI_NIF|ADDRESS|
POSTCODE|TOWN|PROVINCE|ORIGINAL UPB|CURRENT UPB|DISCOUNT|STATUS CODE|
PAYMENT PLAN|ASNEF|PAYMENT DATE|PAYMENT_AMOUNT|COMISSION|LEGAL_COSTS|
LETTER_COSTS
SOMETHING HERE|TRAMO|107522|276|AN ADDRESS HERE|SOMETHING HERE|
SOMETHING HERE|SOMETHING HERE|SOMETHING HERE|28|55,43|55,4

Code:

data local.newfile;
infile imp firstobs=2 dlm="|" dsd truncover lrecl=32767;
input deal : $16.
tranche : $16.
partner_account_number : $16.
account_number : $16.
name : $200.
dni_nif : $16.
address : $200.
postcode : $200.
town : $200.
province : $200.
original_upb : commax14.2
current_upb : commax14.2
scount : $50.
discount : $50.
status_code : $50.
payment_plan : $50.
asnef : $50.
payment_date : $50.
payment_amount : commax14.2
commission : commax14.2
legal_costs : commax14.2
letter_costs : commax14.2
;
run;

It just won't work. It puts my payment amount into the payment date
(and I'm only using character fields for many things at this stage to
check that it has loaded the file correctly...).

WHAT is going on?

Thanks.
From: GuyA on
Sorry, that pasted text got messed up:

DEAL|TRANCHE|PARTNER ACCOUNT NUMBER|ACCOUNT NUMBER|NAME|DNI_NIF|
ADDRESS|POSTCODE|TOWN|PROVINCE|ORIGINAL UPB|CURRENT UPB|DISCOUNT|
STATUS CODE|PAYMENT PLAN|ASNEF|PAYMENT DATE|PAYMENT_AMOUNT|COMISSION|
LEGAL_COSTS|LETTER_COSTS

SOMETHING HERE|TRAMO|107522|276|SOMETHING HERE|SOMETHING HERE|
SOMETHING HERE|SOEMTHING HERE|SOMETHING HERE|28|55,43|55,43||301||||
0|||
From: GuyA on
Ignore this. I'm a cretin. A wonderfully non-real "scount" variable
was of course messing everything up for me...