Search found 1810 matches

by Gregory Martin
April 5th, 2012, 2:44 am
Forum: Entry
Topic: Elseif Question
Replies: 1
Views: 3214

Re: Elseif Question

There is a slight difference between the two formulations. The two following blocks of code do the same thing: if A then elseif B then else endif ; if A then else if B then else endif ; endif ; Why is a second endif needed in the second block? It helps to indent the code to understand why: if A then...
by Gregory Martin
April 5th, 2012, 2:44 am
Forum: Entry
Topic: Partial Save
Replies: 9
Views: 11279

Re: Partial Save

Indeed, both "allow partial save" and the savepartial function work independently of each other, though ultimately they do the same thing. You can have the operator control all partial saves, in which can you'll enable them in the data entry options. Or you as the programmer can control th...
by Gregory Martin
April 5th, 2012, 2:42 am
Forum: Entry
Topic: Mistyping Large Values on the PDA
Replies: 1
Views: 3079

Re: Mistyping Large Values on the PDA

This might be a bit cumbersome, but you could write a function to verify that the enumerator intended to write these large values. The cumbersome part comes in that you have to call this function after every variable that might contain a large number. PROC GLOBAL alpha ( 32 ) str; function confirmLa...
by Gregory Martin
April 2nd, 2012, 5:44 pm
Forum: Tabulation
Topic: Weights
Replies: 2
Views: 4693

Re: Weights

Generally you will use a batch edit application to add weights to a data file. Often you use the external file lookup features of CSPro to identify the weights. That is, you will have a file, prepared in Excel or another application, that contains each geographic area (an enumeration area or a clust...
by Gregory Martin
April 1st, 2012, 5:26 pm
Forum: Entry
Topic: How to creat logic files for a multiple question
Replies: 19
Views: 22275

Re: How to creat logic files for a multiple question

Could you write this: PROC A if $ in 1 : 5 then if A1($) = "1" then A1($) = " " ; else A1($) = "1" ; endif ; reenter ; elseif $ = 0 then numeric ctr; do ctr = 1 while ctr <= 5 if A1(ctr) = " " then A1(ctr) = "0" ; endif ; enddo ; skip to B; endif ;
by Gregory Martin
March 26th, 2012, 12:48 am
Forum: Entry
Topic: How to creat logic files for a multiple question
Replies: 19
Views: 22275

Re: How to creat logic files for a multiple question

Unfortunately, CSPro is not as good at addressing multiple-checkbox questions as some other software packages. This is something that we are going to address in the new CSPro, version 5, that will come out in a couple months. But for now, you generally have two options when you want to create such a...
by Gregory Martin
March 23rd, 2012, 8:39 pm
Forum: Tabulation
Topic: Tabulating Alpha values
Replies: 1
Views: 3748

Re: Tabulating Alpha values

Have you read the discussion here?

http://csprousers.org/forum/viewtopic.php?f=5&t=391
by Gregory Martin
March 23rd, 2012, 8:23 pm
Forum: Tools
Topic: Capturing the outcome of Compare Data
Replies: 1
Views: 3410

Re: Capturing the outcome of Compare Data

I assume that you're doing this in the context of a menu program and you want to identify, after the comparison runs, whether or not there were any problems. Unfortunately, you can't easily get an error code that returns the results, but you can parse the listing file to identify whether or not ther...
by Gregory Martin
March 23rd, 2012, 8:20 pm
Forum: Tools
Topic: batch programs to binary
Replies: 1
Views: 3796

Re: batch programs to binary

At the moment it is not possible to convert a batch program to a binary. The CSPro binary format (.enc) can only be used for data entry application. Some programming languages have code obfuscators that make logic really difficult to read, which effectively renders them uneditable. This could be som...
by Gregory Martin
March 23rd, 2012, 8:14 pm
Forum: Tools
Topic: ExecPFF doesn't understand relative Paths
Replies: 1
Views: 4131

Re: ExecPFF doesn't understand relative Paths

CSPro doesn't support relative path names in the function calls to execpff or execsystem, but you can convert relative names to absolute names using a user-defined function like this: alpha ( 300 ) temp,temp2; function alpha ( 300 ) relativeToAbsolute( alpha ( 300 ) path) // first figure out how man...