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 (October 2001, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 16 Oct 2001 15:04:46 -0600
Reply-To:     Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject:      Re: Update Multiple Recods using Form (Sas Dispatcher)
Comments: To: wollo_desse@hotmail.com
Content-Type: text/plain; charset=us-ascii

OK, I see what you're doing now.

You're not trying to update all the records in one form. You're creating a separate form for each record. As far as I know, you can't submit multiple forms at once.

You will have to put all of your records into one form. That shouldn't be hard - you just have to create a counter and append its value to each field.

By the way, it doesn't look like your code would generate correct HTML. There will an instance of "<form>" for each observation in &login, but there will be only one "</form>", because that code is inside an IF. You might want to run the generated HTML through a validity checker such as the ones at <http://validator.w3.org/>.

-- JackHamilton@FirstHealth.com Development Manager, Technical Group METRICS Department, First Health West Sacramento, California USA

>>> "Action Man" <wollo_desse@hotmail.com> 10/16/2001 12:35 PM >>>

Hi Jack;

Here is the program which I am using to display the form.

%macro Create_Multipl_Forms; options mprint mlogic symbolgen; libname getpanel '/Disk1/states'; %global STUI login pw ;/* These value were passed from prevouse pages (programs) */

data &login; set getpanel.&login; if stui="&STUI"; /* This value was passed from prevouse pages */ run; /* There are 18 STUIs. they all are the same values*/ /* But the rest of the variables have differnt values */

proc sort data=&login; by stui; run;

data _Null_; set &login end=last; file _webout; Put '<Form Action="' "&_url" '" Method=Get>';

put "<Center>"; put '<Table Width="100%" align="Center"> ';

Put '<TR>';

Put '<TD><input type="text" Name="Status" Value="' status '" size="1" Maxlength="1"></TD>';

Put '<TD> <input type="text" name="stui" value= "' STUI '" Size="12" Maxlength="12"></TD>';

Put '<TD> <input type="text" name="cotycode" value= "' cotycode '" Size="3" Maxlength="3"></TD>';

Put '<TD> <input type="text" name="citycode" value= "' citycode '" Size="3" Maxlength="3"></TD>';

Put '<TD> <input type="text" name="comment" value= "' comment ' "Size="38" Maxlength="38"></TD>';

Put '<TD> <input type="text" name="Panel" value= "' Panel '" Size="5" Maxlength="5"></TD>';

If last then do;

Put '</TR>'; Put "</table></center>"; put "<input type=hidden Name=_service" " Value=&_service> "; Put '<INPUT TYPE=hidden NAME=_debug VALUE="128"> ';

put "<input type=hidden name=STUI Value=&STUI >";

put "<input type=hidden name=login Value=&LOGIN >";

put "<input type=hidden name=pw Value=&pw >";

Put "<input type=hidden Name=_program " "Value=micsourc.update_for_sasl.sas>";

Put "<input type=submit Value=Update>";

Put '</Form>';

Put "</Center>"; end;

run;

%mend Create_Multipl_Forms %Create_Multipl_Forms;

/******************************************************/

The following is the program which I used to update the updated records

%macro Update_Penel; options mprint mlogic symbolgen; libname getpanel '/work/netData/new_panel/panelData/states'; %global STUI login run county city msa sic alpha tname ldbae cesid cesae1 ces1date sold outofbus other comment;

data &login; set getpanel.&login;

if stui = "&STUI" then do;

Status="&Status"; Stui = "&STUI"; COTYcode="&COTYcode"; CITYcode="&CITYcode"; COMMENT = "&COMMENT"; Panel="&Panel";

END;

run; %mend Update_Penel; %Update_Penel

Thank you for Ur time again.

Wollo.

>From: "Jack Hamilton" <JackHamilton@firsthealth.com> >To: wollo_desse@hotmail.com, SAS-L@LISTSERV.UGA.EDU >Subject: Re: Update Multiple Recods using Form (Sas Dispatcher) >Date: Tue, 16 Oct 2001 13:08:16 -0600 > >Are you using the correct macro variable names when you do the update? SAS >has probably set variables with names like KEYFIELD, KEYFIELD1, KEYFIELD2, >etc. Are you using only KEYFIELD? What variables are shown as available >in the debug log? > >The method you need to use to get multiple instances of a field is not >explained well in the documentation. > > > >-- >JackHamilton@FirstHealth.com >Development Manager, Technical Group >METRICS Department, First Health >West Sacramento, California USA > > > >>> "Action Man" <wollo_desse@hotmail.com> 10/16/2001 11:44 AM >>> > >Hi Jack; > >Yes I am talking about SAS/Intrnet Dispatcher. I am able to display >multiple >records forms. But WHen I update those forms, The value of first record >update all records. Is there anything I need to do in front end, beofer I >brought the data into the form? > >Kindly; >Wollo > > > >From: "Jack Hamilton" <JackHamilton@firsthealth.com> > >To: wollo_desse@HOTMAIL.COM, SAS-L@LISTSERV.UGA.EDU > >Subject: Re: Update Multiple Recods using Form (Sas Dispatcher) > >Date: Tue, 16 Oct 2001 11:37:22 -0600 > > > >If by "SAS Dispatcher" you mean the Application Dispatcher in >SAS/Intrnet, > >there's no restriction on the number of records that may be updated, or >if > >there is it's a large limit. I have a form that updates as many as 6 > >records in 2 different tables. > > > > > > > > > >-- > >JackHamilton@FirstHealth.com > >Development Manager, Technical Group > >METRICS Department, First Health > >West Sacramento, California USA > > > > > > >>> "Action Man" <wollo_desse@HOTMAIL.COM> 10/16/2001 10:18 AM >>> > >Hi SASL; > > > >I have multiple records with one Key Variable as follow: > >ID is the key variable. > > > >ID Camp_name L_code > >0004 Duba_maufacturing 32 > >0005 Duba_maufacturing 25 > >0006 Duba_maufacturing 32 > > > >I need to use SAS Dispatcher FORM to update all records in one form. But >a > >form can update only one record at a time. Is there anyway to update all > >these records displayed on this form at the same time and update it at >once > >with one "Submit" Button. > > > >Kindly; > >Wollo > > > > > >_________________________________________________________________ > >Get your FREE download of MSN Explorer at >http://explorer.msn.com/intl.asp > > > > > > > > >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > >

_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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