Search found 1799 matches
- September 22nd, 2011, 1:44 pm
- Forum: Tabulation
- Topic: Tabulation with Alpha fields
- Replies: 7
- Views: 16443
Re: Tabulation with Alpha fields
Unfortunately, only numeric values can be tabulated. In general in CSPro, if you want to convert an alpha string to a number, you can use the tonumber function. It would take some more advanced programming, but you could use the working storage dictionary, and the labels in it, to indirectly create ...
- September 22nd, 2011, 1:01 pm
- Forum: Entry
- Topic: multi occurrence
- Replies: 9
- Views: 10291
Re: multi occurrence
Hello, The easiest way to do is to use a loop, especially if you have more than two occurrences. See the attachment for an example. The relevant code is pasted here: PROC VALUE numeric i; do i = 1 while i < curocc () if VALUE(i) = VALUE then errmsg ( "Must enter unique value" ); reenter ; ...
- August 31st, 2011, 6:54 pm
- Forum: Entry
- Topic: Help logic code, answers to sub-answers
- Replies: 4
- Views: 7028
Re: Help logic code, answers to sub-answers
You can use the setvalueset function to change the value set for a field. So you might create three value sets for the field and then you would write logic like this: PROC Q1 if Q1 = 1 then setvalueset (Q2,Q2_VS1); elseif Q1 = 2 then setvalueset (Q2,Q2_VS2); elseif Q1 = 3 then setvalueset (Q2,Q2_VS3...
- August 31st, 2011, 6:50 pm
- Forum: Entry
- Topic: How to control the scrolling programming (previus or next
- Replies: 3
- Views: 4746
Re: How to control the scrolling programming (previus or nex
This is an interesting idea, and you are right that it doesn't sound possible the way that OnKey currently works. May I ask what your intention is with checking whether or not the user is clicking on Previous or Next? Might you be able to trap such events using KillFocus. By the way, the Census Bure...
- August 31st, 2011, 6:39 pm
- Forum: Feature Requests
- Topic: Do Cspro an open source project
- Replies: 5
- Views: 11701
Re: Do Cspro an open source project
At times the Census Bureau has given out code for CSPro, so if you are a developer, you should contact them and ask for some of the source code. For instance, other software packages have created ways to read or write CSPro dictionaries and data files, and they have gotten code from the Census Burea...
- June 29th, 2011, 1:14 am
- Forum: Other
- Topic: Creating a Sample Data File
- Replies: 0
- Views: 38035
Creating a Sample Data File
If you want to create a simple sample data file (perhaps to test tabulations or edits instead of using the complete data file), you can create a small batch program to select cases to output. For instance, this program selects every twentieth case to generate a 5% sample: PROC GLOBAL numeric sampleP...
- June 29th, 2011, 1:14 am
- Forum: Other
- Topic: Using execsystem to Retrieve a Computer's Username
- Replies: 1
- Views: 4740
Using execsystem to Retrieve a Computer's Username
An example of when this could be useful is if you want to create a PFF file with the data file named after the login ID of the keyer who has logged onto that machine. PROC GLOBAL alpha ( 20 ) tempFilename = "tempusername.txt" ; alpha ( 300 ) str; FILE inputFile; alpha ( 50 ) username; PROC...
- June 29th, 2011, 1:08 am
- Forum: Entry
- Topic: Randomizing the Order of Questions
- Replies: 8
- Views: 12407
Randomizing the Order of Questions
In CSPro there is no simple way to change the order that questions are asked in a data entry application, but it can be done with some logic. The following code is an example of how one can use logic to randomize the order that questions are asked. The code randomizes the order in which five questio...
- June 29th, 2011, 1:03 am
- Forum: News
- Topic: CSPro 4.1.001 Released!
- Replies: 0
- Views: 40977
CSPro 4.1.001 Released!
The new version of CSPro, 4.1, has been officially released and is available on the Census Bureau's website: http://www.census.gov/population/international/software/cspro/csprodownload.html Notable features in this new version include some tablet-ready features (popup windows with radio buttons, dat...