Search found 1794 matches

by Gregory Martin
September 28th, 2011, 2:34 pm
Forum: Tools
Topic: Tool for Locating Incomplete Cases
Replies: 5
Views: 7659

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...
by Gregory Martin
September 22nd, 2011, 2:20 pm
Forum: Editing
Topic: HTML Listing Report
Replies: 4
Views: 7355

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...
by Gregory Martin
September 22nd, 2011, 2:05 pm
Forum: Entry
Topic: Automatic calculation (auto fill function ?)
Replies: 4
Views: 7376

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...
by Gregory Martin
September 22nd, 2011, 1:55 pm
Forum: Entry
Topic: ERROR:You must assign the result of the function to an alpha
Replies: 12
Views: 12581

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...
by Gregory Martin
September 22nd, 2011, 1:51 pm
Forum: Entry
Topic: do varying (help)
Replies: 2
Views: 4177

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...
by Gregory Martin
September 22nd, 2011, 1:44 pm
Forum: Tabulation
Topic: Tabulation with Alpha fields
Replies: 7
Views: 16407

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 ...
by Gregory Martin
September 22nd, 2011, 1:01 pm
Forum: Entry
Topic: multi occurrence
Replies: 9
Views: 10271

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 ; ...
by Gregory Martin
August 31st, 2011, 6:54 pm
Forum: Entry
Topic: Help logic code, answers to sub-answers
Replies: 4
Views: 7024

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...
by Gregory Martin
August 31st, 2011, 6:50 pm
Forum: Entry
Topic: How to control the scrolling programming (previus or next
Replies: 3
Views: 4735

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...
by Gregory Martin
August 31st, 2011, 6:39 pm
Forum: Feature Requests
Topic: Do Cspro an open source project
Replies: 5
Views: 11625

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...