Hi all! I hope somebody can help me with this
I have some .skv. files that I need to covert. The files consist fo three record types each, semicolon separated.
E.g.:
01;2017-03-31;header;just some text;;
02;2017-03-31;Vanilla;0.00;2L;36148011111111;99991231;+;1999.50;;
02;2017-03-31;Pistache;150.75;5L;36148012345678;99991231;-;157.32;;
09;2017-03-31;trailer;how do I do this;;
No need to mention the above is made up.
I need to convert the numbers that are underlined. Then I need it all to be copied back (using proc export) and it the rest has look EXACTLY the same. My problem is that the bold values are seen by PROC IMPORT as numeric values and therefore 0.00 is stored as 0 in a numeric field. The record type (the first two chars) are also tagged numeric and contain: 1, 2 and 9. But I don't need this. I NEED them to stay 01, 02 etc and 0.00 should stay 0.00. I do not want to ping-pong with the vars from char to num and back to char. Is there not an easy way where I can just get all the variables in (different output for the three records types of course) and tell PROC IMORT : "HEY ... I want them ALL in as CHAR. Do not try to fix anything.
I want this in my table for the 02 record typeM; all character.
VAR1 = 02
VAR2 = 2017-03-31
VAR3 = Vanilla
VAR4 = 0.00
VAR5 = '2L'
VAR6 = '36148011111111'
Then I want to convert VAR6 to 123456789 and then I want to write it back to a new .skv file looking like:
02;2017-03-31;Vanilla;0.00;2L;123456789;99991231;+;1999.50;;
How do I do this? 🙂
I do not want to do special things to make the record-type 02 again after proc import has changed it to 2. The same for 0 that should be 0.00.
I hope I've explained in a way so you "guys" know that I want. I am almost certain this is just an option I have to choose somewhere but I haven't been able to find it.
Best regards,
Menno
... View more