Alastair I have never seen the "CONFIRM 0" clause at the end of the RUN command. If you are trying to pass 3 parameters to the program, the correct syntax would be:
RUN D:\DBCOPY\SOURCE\MultiDat\Pause_Sub.CMD USING 2,'CONFIRM',0 David Blocker [EMAIL PROTECTED] 781-784-1919 Fax: 781-784-1860 Cell: 339-206-0261 ----- Original Message ----- From: "Alastair Burr" <[EMAIL PROTECTED]> To: "RBG7-L Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, August 18, 2004 6:02 PM Subject: [RBG7-L] - Re: IF... THEN query > Thanks, Javier & David. > > If I use this code then the run command at the end just seems to "hang": > > IF vReloadBackUp = 'Reload' + > AND vDBtoCopy CONTAINS 'MenuData' + > AND vOutPut_File CONTAINS 'F:' THEN > SET VAR vMessage = 'Insert the MenuData Zip disk now!' > SET VAR vCaption = 'Waiting...' > SET VAR vButton = 'Continue...' > RUN D:\DBCOPY\SOURCE\MultiDat\Pause_Sub.CMD USING 2 CONFIRM 0 > ENDIF > RUN LaunchBackUp.CMD > > However, this version seems to work: > > IF vReloadBackUp = 'Reload' THEN > IF vDBtoCopy CONTAINS 'MenuData' THEN > IF vOutPut_File CONTAINS 'F:' THEN > SET VAR vMessage = 'Insert the MenuData Zip disk now!' > SET VAR vCaption = 'Waiting...' > SET VAR vButton = 'Continue...' > RUN D:\DBCOPY\SOURCE\MultiDat\Pause_Sub.CMD USING 2 CONFIRM 0 > ENDIF > ENDIF > ENDIF > RUN LaunchBackUp.CMD > > I can't see any reason or difference. Obviously, I have a work-around but it > would be nice to know what's happening. > > TRACE doesn't even seem to "see" the first version. It's as if there is a > bracket or quote missing but it "sees" the second version quite normally > (with no other changes). > > Regards, > Alastair. > > > Alastair: > I have been doing this for years without any problems. > Javier, > ----- Original Message ----- > From: David M. Blocker > To: RBG7-L Mailing List > Sent: Wednesday, August 18, 2004 8:52 PM > Subject: [RBG7-L] - Re: IF... THEN query > > > Alastair > > Either is fine, but it depends on the logic > > For example, if x=1 and y=2 you do one action, but if x=1 and y <>2 you do > a different, you'd do this: > > IF X = 1 THEN > IF Y = 2 THEN > -- actions for x=1 and y=2 > ELSE > -- actions for x=1 and y<>2 > ENDIF > ENDIF > > But if the actions are ONLY done if both conditions are met and there is no > alternative action, then this is fine > > IF X = 1 AND Y = 2 THEN > -- actions > ENDIF > > David Blocker > [EMAIL PROTECTED] > 781-784-1919 > Fax: 781-784-1860 > Cell: 339-206-0261 > ----- Original Message ----- > From: Alastair Burr > To: RBG7-L Mailing List > Sent: Wednesday, August 18, 2004 1:44 PM > Subject: [RBG7-L] - IF... THEN query > > > Is it permissible to combine conditions with AND in the statement like this: > > IF x=1 AND y=2 THEN > ... > ENDIF > > or is it better to break it into two parts: > > IF x=1 THEN > IF y=2 THEN > ... > ENDIF > ENDIF > > I don't remember having any problems in the past but one particular piece of > code seems only to work the second way at the moment and I can't find any > other error. > > (This is an error that's been around for a while so it's not an upgrade > problem.) > > Regards, > Alastair. > > ---------------------------------- > A D B Burr, > St. Albans, UK. > ---------------------------------- > [EMAIL PROTECTED] > ---------------------------------- > >
