If you want to check that the user has entered a 4-digit year,
you could code:
do while \datatype(year,'N') LENGTH(year) \= 4
SAY 'Invalid Date!!... enter year, using only 4 num digits'
pull year
end
You could but it would not work as intended. You need to use
the OR operator not
Yes ... silly me: I wasn't thinking :-[ Thanks for noticing.
do while \datatype(year,'N') | LENGTH(year) \= 4
SAY 'Invalid Date!!... enter year, using only 4 num digits'
pull year
end
Cheers, Chris Poncelet
Hunkeler Peter (KIUK 3) wrote:
If you want to check that the user has entered
You might want to join the TSO Rexx newsgroup.
For TSO-REXX subscribe / signoff / archive access instructions, send email
to [EMAIL PROTECTED] with the message: INFO TSO-REXX
Look at the DO FOREVER process in REXX. It will continue the loop until you
tell it how to get out.
DO FOREVER
Say
On Thu, 23 Oct 2008 04:39:38 +0100, CM Poncelet wrote:
Try:
SAY 'Enter year'
PULL YEAR
DO WHILE \DATATYPE(YEAR,'N')
SAY 'Invalid date 'YEAR':' enter year, using only numeric digits'
PULL YEAR
END
SAY 'Year is 'YEAR /* this line is just to verify ... */
I loathe the top-and-bottom input
: Loop in REXX
On Thu, 23 Oct 2008 04:39:38 +0100, CM Poncelet wrote:
Try:
SAY 'Enter year'
PULL YEAR
DO WHILE \DATATYPE(YEAR,'N')
SAY 'Invalid date 'YEAR':' enter year, using only numeric digits'
PULL YEAR
END
SAY 'Year is 'YEAR /* this line is just to verify ... */
I loathe the top
I retained the original 'structure' because the objective was to fix the
REXX 'DO' loop problem ... without complicating things by also improving
its 'design'.
No, I would not write my own assembler (or any other) code this way.
Cheers,
Chris Poncelet
CA
Paul Gilmartin wrote:
On Thu, 23
:10 PM
Subject: Re: Loop in REXX
On Thu, 23 Oct 2008 04:39:38 +0100, CM Poncelet wrote:
Try:
SAY 'Enter year'
PULL YEAR
DO WHILE \DATATYPE(YEAR,'N')
SAY 'Invalid date 'YEAR':' enter year, using only numeric digits'
PULL YEAR
END
SAY 'Year is 'YEAR /* this line is just to verify ... */
I
hi,
how make a loop using the DO command in REXX?
ex:
Say ' enter wiith the year'
pull year
do until year (not numeric???)
say ' invalid date, enter with the year'
pull year
end
be right the command above?
regards
Try:
SAY 'Enter year'
PULL YEAR
DO WHILE \DATATYPE(YEAR,'N')
SAY 'Invalid date 'YEAR':' enter year, using only numeric digits'
PULL YEAR
END
SAY 'Year is 'YEAR /* this line is just to verify ... */
Cheers,
Chris Poncelet
CA
Claudio Marcio wrote:
hi,
how make a loop using the DO command
9 matches
Mail list logo