Buddy,

 

You are going to laugh at me but I have been doing this for a while as
needed and am not good but decided I like this. Started back to college
to get a programming degree and just confused languages. Forgot in RBase
you need the "then".

 

 

Next please explain what the following does. I like to understand
things. 

 

SELECT pon INTO vpon INDIC IV1 FROM master WHERE pon = .vpo_number

 

Thanks for your time and thanks for the help.

 

Steve

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of Walker,
Buddy
Sent: Monday, April 26, 2010 9:04 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: while loop issue

 

Steve

 

   You need QUIT in quotes and THEN at the end of the WHILE line

 

   While vpo_number <> QUIT 

 

   Should be

 

  While vpo_number <> 'QUIT' THEN

 

 

  Don't clear variables inside while loops set them to null

 

CLEAR VAR vpon

 

Should be 

 

SET VAR  vpon = NULL

 

CLEAR VAR vpo_number 

 

Should be

 

SET AR vpo_number = NULL

 

Even though 

 

SET VAR vpon = pon FROM master WHERE pon = .vpo_number 

 

I would change it to

 

SELECT pon INTO vpon INDIC IV1 FROM master WHERE pon = .vpo_number

 

Buddy

 

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of Steve
Breen
Sent: Monday, April 26, 2010 8:51 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - while loop issue

 

Told you it has been a long day

Here it is as I have it now

Sorry

 

Note vpo_number is text

While vpo_number <> QUIT

-- 1PRINT AP_Internal_Detail WHERE pon = .vpo_number +

-- 1OPTION PRINTER 

-- +

-- |DUPLEX HORIZONTAL +

-- 1|COLLATION ON +

-- 1|COPIES 1 +

-- 1|ORIENTATION PORTRAIT +

--   |PRINTER_NAME \\rsd01\RICOH Aficio SP 8100DN PCL6

LABEL loop1

CLEAR VAR vpo_number

DIALOG 'Enter A CDI Job# or ESC to exit (AP_Internal_Detail):'
vpo_number=10 vkey 1

IF vkey = '[esc]' THEN

  GOTO finish

ENDIF

 

IF vkey = '[enter]' AND vpo_number IS NULL THEN

  RUN errmsg.rmd USING 'No PO# Number Entered - Press Any Key to Enter
One'

  GOTO loop1

ENDIF

 

CLEAR VAR vpon

SET VAR vpon = pon FROM master WHERE pon = .vpo_number

IF vpon IS NULL THEN

  RUN errmsg.rmd USING 'CDI Job# Not found'

  -- GOTO loop1

ENDIF

endwhile

 

LABEL finish

 

RETURN

 

 

 

Stephen 

Reply via email to