Re: Loop in REXX

2008-10-24 Thread Hunkeler Peter (KIUK 3)
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

Re: Loop in REXX

2008-10-24 Thread CM Poncelet
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

Re: Loop in REXX

2008-10-23 Thread Lizette Koehler
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

Re: Loop in REXX

2008-10-23 Thread Paul Gilmartin
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

Re: Loop in REXX

2008-10-23 Thread Claudio Marcio
: 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

Re: Loop in REXX

2008-10-23 Thread CM Poncelet
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

Re: Loop in REXX

2008-10-23 Thread CM Poncelet
: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

Loop in REXX

2008-10-22 Thread Claudio Marcio
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

Re: Loop in REXX

2008-10-22 Thread CM Poncelet
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