LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 21 Sep 2005 12:10:17 -0700
Reply-To:   Bill McKirgan <bill-mckirgan@UIOWA.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Bill McKirgan <bill-mckirgan@UIOWA.EDU>
Organization:   http://groups.google.com
Subject:   Re: SCL reading screen variable field properties
Comments:   To: sas-l@uga.edu
In-Reply-To:   <3p8a4mF8u0h6U1@individual.net>
Content-Type:   text/plain; charset="iso-8859-1"

Richard,

Thank you for your suggestions. As always, you are quick to share your SCL wisdom, but I'm afraid I need some additional coaching. I have not been successful applying your example of how to check for field protection. Would you mind taking a look at this and let me know what I'm doing incorrectly?

When I do this...

dpb5b : p5c=field('protected','dpa5c'); if dpb5b NOT in (1, 5 ) then do; cursor dpb5b ; /* link to data validation message */ link value_1_5; end; else if p5c=1 then do; cursor dpb5c; end; put p5c=; /* <---just putting it in the log to see */ return;

...p5c always returns as zero.

p5c=0

The variable I am checking protect/unprotect on has that property set in a previous labeled section of SCL code. So, when the user presses a 1 to indicate, "NO" for current episode of depression, the related 'current episode' questions are protected from data entry. When I test the fields, they work as expected. That is, if there is NO current episode, then all related contingency questions are protected and the cursor passes by them.

However, not all of the questions appear on the same data entry screen, and this is what is giving me trouble (no, FITS) especially in sections where I have two or more columns of fields to enter for each question.

So, when the cursor lands on the last unprotected field on an entry screen, it does not automatically jump to the next open/unprotected field on the following page/screen when the user enters a value and presses the enter key. Instead, the cursor goes to the command line: Command ===> without advancing to the next page.

I cannot get the FIELD function to return anything but a zero. Should I be coding this in another section of my SCL program?

I'm stumpped, but at least I have a fallback plan, and that is to create the flag variables I need in the sections where protect/unprotect is being set.

Thank you *again*,

Bill McKirgan

Richard A. DeVenezia wrote: > > Bill: > > The FIELD function will report the state of the PROTECT flag. > > * set the protection; > rc = FIELD ('PROTECT', 'Company'); > > * check for protection; > isProtected = FIELD('PROTECTED', 'Company'); > put "Company" isProtected=; > > * unprotect; > UNPROTECT Company; > > These are all interchangeable > > PROTECT <varname>; > FIELD('PROTECT', '<varname>'); > varname._protect(); * frame widgets only; > > > UNPROTECT <varname>; > FIELD('UNPROTECT', '<varname>'); > varname._unProtect(); * frame widgets only; > > FIELD('PROTECTED', '<varname>'); > varname._isProtected(); * frame widgets only; > > -- > Richard A. DeVenezia > http://www.devenezia.com/


Back to: Top of message | Previous page | Main SAS-L page