Exporting .not file along with Data file

Other discussions about CSPro
Forum rules
New release: CSPro 8.0
Bharadwaj

Exporting .not file along with Data file

Post by Bharadwaj »

Hi...

Now we are using editnote() function to enter text or verbatim. How it can be exported into SPSS file along with main data? Or exporting into Excel question wise.

We have tried to export, but it could not happened. We have copy pasted into excel and separated all the responses question wise. Which is taking more time then usual.

Please help me in quick export either in SPSS or excel by question wise to merging with main SPSS data. Thanks

Regards

Bharadwaj
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Exporting .not file along with Data file

Post by Gregory Martin »

The format of each notes record is as follows:
The first n characters are the id fields of the case.

The next 32 characters are the field name as given in the dictionary (left justified).

The next 12 characters are blank (reserved for future use).

If a field has record occurrences then the next 5 characters are the record occurrence number (right justified, blank filled). If the field has only one record occurrence then the next 5 characters are blank.

The remaining characters are the note text.
I suggest that you create a CSPro dictionary to describe your notes file and then use the Export Data tool to export that file to SPSS. At that point you could merge it with your other data.
Bharadwaj

Re: Exporting .not file along with Data file

Post by Bharadwaj »

Thanks Gregory

I will try and get back to you if have any questions.

Regards

Bharadwaj
erikee33
Posts: 7
Joined: January 26th, 2016, 7:13 am

Re: Exporting .not file along with Data file

Post by erikee33 »

Hi there,

I'm also trying to export the .not file from my survey. I'm sorry; I'm going to have to ask for some hand holding. I've read the CSEntry explanation and the comments on this forum but I'm still unsure of where to start when it says I need to create a new dictionary. Do I have to start from scratch and create an entirely new dictionary or can I convert the original dictionary I used in my application for my survey since all the information on id values and fields etc. are already in it? If not, how do I create a new dictionary using the information of the format of each record? Is there an example I can look at?

Thank you in advance so much for any help!

Erika
Saint
Posts: 63
Joined: November 22nd, 2013, 4:59 am

Re: Exporting .not file along with Data file

Post by Saint »

Yes.. You have to create a new dictionary from scratch. The ID items should be the same as you have for the main dictionary used for the original application. Then you can add a record in which you have the the following three variables with the corresponding lengths:
variable name with length 42 (this is the variable name that has the note)
occurrence number with length 5 (this is the occurrence number within the record for the text. For example if there is variable sex in record household, you want to know
whether the note refers to line number 1 or 2. This is the variable that captures that).
text with length say 300 (this is the actual note so choose the length you find most appropriate).
Hope this helps.

Best...
erikee33
Posts: 7
Joined: January 26th, 2016, 7:13 am

Re: Exporting .not file along with Data file

Post by erikee33 »

Thank you for the speedy reply. I will try that and get back to you if I'm still stuck. Thank you again for your help. It's much appreciated.
erikee33
Posts: 7
Joined: January 26th, 2016, 7:13 am

Re: Exporting .not file along with Data file

Post by erikee33 »

Hello,

I successfully exported my notes data by creating a new dictionary file and using the export data function. However, the one problem is that the program is cutting off my notes. I ensured to put a sufficient length in the dictionary (600 characters) for the text variable but when I look at my notes, I find they're getting cut off at about 120 charcters. There doesn't seem to be a pattern of where they're cutting off the note. I.e. they don't cut it off at a comma or a period, but mid sentence.
Please help! Thank you in advance for your help.

Erika
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Exporting .not file along with Data file

Post by josh »

It looks like when a note is beyond a certain length it wraps around to the next line in the notes file. When you export, each line of the note from the notes file is treated as a separate record. For example, when I export to CSV and read it the CSV in Excel my single long note is broken up into multiple rows in the spreadsheet. Depending on what you are exporting to you can join the lines back together into a single line by matching all the notes records that have the same id, field name and occurrence number. If that isn't possible in whatever package you exporting to I could help you write a batch application to do the same in CSPro before exporting.
erikee33
Posts: 7
Joined: January 26th, 2016, 7:13 am

Re: Exporting .not file along with Data file

Post by erikee33 »

Hi Josh,

Thanks for your reply. I could use some help. I don't see the rest of the notes anywhere in the exported file. I tried exporting in the different formats (.txt and .csv) but I don't see the cut-off parts of the notes in any of the exports.

Would you be able to help me write the batch application?

Thank you
Erika
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Exporting .not file along with Data file

Post by josh »

Make sure that the MAX for the record in your notes dictionary is set to something large - more than the number of lines of the largest note. In my test I set it to 100. If you have it set to 1 (the default) it will only export the first line. If you look in the log file you will see error messages about too many record occurrences. If that doesn't work I'll sketch out how to write the batch app.
Post Reply