occurs item inside a multiple occurring record

Discussions about editing and cleaning data
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

occurs item inside a multiple occurring record

Post by AriSilva »

I´m trying some editing on a variable which is a subitem (e18) of an item that occurs 3 times. The item belongs to a record type with a max of 20.
I´m inside of that proc e18
The checking works fine, the errmsg also, but when I try to impute the field it does something which I do not know, and change the original value to default.
I´ve tried using the full index system, such as
e18(curocc(rec),curocc(item))
but nothing seems to work.
Apparently I´m doing something very wrong but I cannot catch it.
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: occurs item inside a multiple occurring record

Post by josh »

If you have a numeric parent item you can run into problems with subitems if blanks or non-numeric characters are introduced into the parent item. Make sure the parent item is alpha.

If that isn't the problem please send us a test app so we can reproduce.
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: occurs item inside a multiple occurring record

Post by AriSilva »

Attached the test app.
Plz, execute first the TesteE18.pff which will generate an output file, then execute the TesteE18_Segunda.pff which is the same program reading the output file. You will see that all the variables have default values thatwere not there at the beginning.
Best
Attachments
91_Josh.rar
(131.99 KiB) Downloaded 293 times
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: occurs item inside a multiple occurring record

Post by josh »

The dictionary file is missing from the app you attached.
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: occurs item inside a multiple occurring record

Post by AriSilva »

My mistake.
I did not test it throughly before sending. Sorry.
Here it goes
Attachments
91_Josh_A.rar
(267.86 KiB) Downloaded 280 times
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: occurs item inside a multiple occurring record

Post by josh »

Try making the parent item E18_VIAGENS type alpha. CSPro often runs into problems with numeric items that have subitems. When the subitems are blank it messes up the item.
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: occurs item inside a multiple occurring record

Post by AriSilva »

You are right (as always).
I´ve changed the item group to alpha and the program worked.
I would suggest writing something about that in the help when using subitems, if it is not there already.
Thanks
Best
Ari
Post Reply