writecase and ~
Posted: March 15th, 2012, 10:32 am
I was just about to use the writecase() function to update data in an external dictionary when I discovered something curious. Cut'n'pasted from the help file:
"If the case identified by var-list already exists, the writecase function will overwrite the existing case if no records in the case have changed length. If any record in the case has changed length each record in the case will be marked with a tilda, ‘~’, in the first position of the record and entire case will be appended to the end of the associated file."
why the tildas and the extra line in the data file? and is there a clever way to process them?
(I was going to update addresses in my external dictionary, and of course it should be expected that the record could change length - if the address field was the last one in the record. Fixed this by adding another field to the record, but I'm still curious why CSPro works this way
Anne
"If the case identified by var-list already exists, the writecase function will overwrite the existing case if no records in the case have changed length. If any record in the case has changed length each record in the case will be marked with a tilda, ‘~’, in the first position of the record and entire case will be appended to the end of the associated file."
why the tildas and the extra line in the data file? and is there a clever way to process them?
(I was going to update addresses in my external dictionary, and of course it should be expected that the record could change length - if the address field was the last one in the record. Fixed this by adding another field to the record, but I'm still curious why CSPro works this way
Anne