Search found 1795 matches
- October 4th, 2011, 12:46 pm
- Forum: Entry
- Topic: multi occurrence
- Replies: 9
- Views: 10287
Re: multi occurrence
If you want to skip blanks, it might be easiest (and clearest) to account for this before the loop: PROC VALUE numeric i; if VALUE <> notappl then do i = 1 while and i < curocc () if VALUE(i) = VALUE then errmsg ( "Must enter unique value" ); reenter ; endif ; enddo ; endif ;
- September 28th, 2011, 2:34 pm
- Forum: Tools
- Topic: Tool for Locating Incomplete Cases
- Replies: 5
- Views: 7665
Tool for Locating Incomplete Cases
A new tool has been posted on the Tools page. It allows you to quickly identify which of your data files have partially saved (incomplete) cases in them. It does this by searching all the .sts (status) files in a directory or group of directories. This tool may be useful for people coordinating data...
- September 22nd, 2011, 2:20 pm
- Forum: Editing
- Topic: HTML Listing Report
- Replies: 4
- Views: 7360
HTML Listing Report
At the moment, CSPro's listing files (.lst) are only text files. There are a few custom parameters to the file located in the .pff file: ListingWidth=80 MessageWrap=No ErrmsgOverride=No But for more control over how users see listing reports after a program run, a programmer may want to output listi...
- September 22nd, 2011, 2:05 pm
- Forum: Entry
- Topic: Automatic calculation (auto fill function ?)
- Replies: 4
- Views: 7379
Re: Automatic calculation (auto fill function ?)
You don't need to use the impute function. That function is in CSPro for batch editing programs and I can't think of a case in which it would necessary in a data entry application. I do not completely understand your code, but it sounds like you could accomplish what you want to by writing something...
- September 22nd, 2011, 1:55 pm
- Forum: Entry
- Topic: ERROR:You must assign the result of the function to an alpha
- Replies: 12
- Views: 12584
Re: ERROR:You must assign the result of the function to an a
For the benefit of other users, one way to code this would be like this: if not poschar ( "A" ,Q1) then skip to Q3; endif ; The poschar function will search the whole Q1 string, looking for "A." If it finds "A" it will return the position of that character. Otherwise it...
- September 22nd, 2011, 1:51 pm
- Forum: Entry
- Topic: do varying (help)
- Replies: 2
- Views: 4180
Re: do varying (help)
I would write the code like this, without using a loop: PROC Q132_DECLCONF if Q132_DECLCONF = "F" then // F alone skip to Q135_PROBPROFES; elseif poschar ( "ABCDE" ,Q132_DECLCONF) and poschar ( "F" ,Q132_DECLCONF) then // F found with another letter errmsg ( "You c...
- September 22nd, 2011, 1:44 pm
- Forum: Tabulation
- Topic: Tabulation with Alpha fields
- Replies: 7
- Views: 16421
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: 10287
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: 7027
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: 4745
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...