Dynamic Value Set from a Lookup File

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
Nikola
Posts: 27
Joined: December 24th, 2021, 4:30 am

Dynamic Value Set from a Lookup File

Post by Nikola »

I am making "Dynamic Value Set from a Lookup File" following CSPro book.

With that I don't know what should I do to solve below errors (I attached snapshot):

ERROR(7): 'codes' is not a declared variable or is a misspelled dictionary entry
ERROR(8): 'labels' is not a declared variable or is a misspelled dictionary entry

I made questionnaires named 'codes' and 'labels' in PROC PROVINCE, but it not working.

Thank you in advance.
Attachments
Snapshot
Snapshot
CSPro_question.png (33.56 KiB) Viewed 1071 times
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Dynamic Value Set from a Lookup File

Post by Gregory Martin »

With the model you are following, you have to declare codes and labels as arrays: Something like:
array codes(500);
array string labels(500);
You can put that code before or after your nextEntry declaration.

Better yet, use the valueset object: https://www.csprousers.org/help/CSPro/v ... ction.html
Nikola
Posts: 27
Joined: December 24th, 2021, 4:30 am

Re: Dynamic Value Set from a Lookup File

Post by Nikola »

Thank you!
Post Reply