Number of Record in one dictionary and skip patern

Discussions about CSEntry
Post Reply
khurshid.arshad
Posts: 572
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Number of Record in one dictionary and skip patern

Post by khurshid.arshad »

Dear Gregory Martin
I have few questions.

1. How many records we can create in one dictionary.
2.During data entry i have found error between child and mother age. Mother is on 2 occurrence and child is on 4 occurrence. How can i jump from 4 occurrence to 2 occurrence in age variable.


regards.
arshad
Gregory Martin
Posts: 1792
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Number of Record in one dictionary and skip patern

Post by Gregory Martin »

I don't think that there's a limit to the number of records in your dictionary. There is a limit to the number of occurrences of a record (9999) but you can add as many records as you like. I just created a dictionary with 400 different records. If you want more than 10 records, you need to go to the ID screen and change the length of the (record type) value.

I don't understand your second question. Are you trying to move to a specific occurrence? You could write:
reenter AGE(2);
khurshid.arshad
Posts: 572
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Number of Record in one dictionary and skip patern

Post by khurshid.arshad »

Gregory Martin

Thanks for the prompt reply.

Please see attached programme. I have 71 records in this programme. Now i am going to add new record and It give me an error. "RECORD TYPE VALUE CANNOT BE TILDE (~) IN THE FIRST CHARACTER POSITION." I think "~" this is not acceptable in CSPro or maybe i am doing something wrong.



Regarding my second question;
Actually i have a check between mother and child age. KPO typed mother age 45 in second line and child age is 35 in 5th line. 10 years gape is not acceptable. Now i want to correct mother age which is 55 not 45. I want to move from child to mother age without using mouse. Can i use "Select option". If yes, then how.

Regards.

arshad
Attachments
PRHS_ROUND_1.5_sample.rar
(33.44 KiB) Downloaded 471 times
khurshid.arshad
Posts: 572
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Number of Record in one dictionary and skip patern

Post by khurshid.arshad »

Dear Gregory Martin

Any update on my questions.

Arshad
Gregory Martin
Posts: 1792
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Number of Record in one dictionary and skip patern

Post by Gregory Martin »

Tildes cannot be used as record types because the tilde is actually a way for CSPro to ignore records in your data file. For example, if you have data like this:

Apple
~range
Banana

CSPro will read in only the Apple and Banana records, ignoring what was at one point an Orange record.

You probably should increase the size of your record type from 1 to 2 digits. That way you don't have to be so creative with the characters available to you.

For your issue with ages, you could write something like this:
PROC R_Q4

    
if R_Q4 = 3 then // children
    
        
numeric rowMother = seek(R_Q4 = 2);
        
numeric ageMother;
        
        
if R_Q2(1) = 2 then // mother is the head of the household
            rowMother = 1;
        
endif;
        
        
if rowMother then // a mother exists, check age difference
        
            
if R_Q3_YEARS(rowMother) - R_Q3_YEARS < 15 then // if mother is less than 15 years older than child, a problem...
            
                
errmsg("Age difference between child and mother (%d) is not valid.",R_Q3_YEARS(rowMother) - R_Q3_YEARS)
                    
select("Modify mother's age",R_Q3_YEARS(rowMother),"Modify child's age",R_Q3_YEARS(curocc()));
                                
            
endif;          
        
        
endif;  
    
    
endif;
khurshid.arshad
Posts: 572
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Number of Record in one dictionary and skip patern

Post by khurshid.arshad »

Thanks.
Arshad
Post Reply