extract variables from fixed positions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

extract variables from fixed positions

María Laura García
Hi,

I have a file where the variables I'm interested at aren't organised by columns... I mean there isn't a column for each variable because there are more than 300 variables (codes of payment) and the file allowes just 25 fixed positions that are filled in with variables (codes of payments), 25 fixed positions that are filled in with sub codes of payments and 25 fixed positions filled in with money payed for each concept/code of payment.

The file I'm dealing with looks like this:

id cod_concept1 subcod_concept1 money_conc1 cod_concept2 subcod_concept2 money_conc2
1 001 001 727436 001 002 415770
2 001 001 530187 131 000 854
3 080 000 1500 001 001 260486

The sub code indicates concept's times of payments (concept 1 can be payed more than once).

The file I need should look like this:

id cod_001_1 cod_001_2 cod_080_0 cod_131_0
1 727436 415770 0 0
2 530187 0 0 854
3 260486 0 1500 0
 
I would really appreciate any help!

Regards,

Laura




--
please consider the environment…do you really need to print this email?