[Info-vax] DCL: Restrictions to READ loop process?

Richard B. Gilbert rgilbert88 at comcast.net
Wed Sep 16 12:56:47 EDT 2009


Robb wrote:
> On Sep 16, 12:31 am, CY <christ... at gmail.com> wrote:
>> On 15 Sep, 21:14, Robb <rob... at gmail.com> wrote:
>>
>>> Hi,
>>> I'm trying to put a conditional IF-THEN statement in a READ loop that
>>> triggers a COPY.
>>> It only seems to work the first time through the loop.
>>> Is there something about the READ loop that prevents this?
>>> Thanks,
>>> Robb
>> Trying to copy the file you are reading? might be locked? what do I
>> know, Im blonde...
>> //CY
> 
> Wow, thanks for the great, quick responses everyone!  Nice to find a
> newsgroup that isn’t dead. 
> 
> Well CY, seems you were right sort of.
> 
> Adding SET VERIFY like JF Mezei recommended, I see that the process
> errors out if the file I'm asking it to copy doesn't exist.
> 
This comes as a surprise????  I can't imagine how to copy a file that 
does not exist nor why anyone would try!

> Now to figure out what to add to my copy command so it ignores errors
> and continues looping… if the file doesn’t exist then I don’t care if
> it isn’t copied.
> 
See HELP SET NOON and/or HELP ON ERROR.  The first allows your script to 
continue after an error.  ON ERROR declares an error handling entry 
point in your DCL.

Just remember that sooner or later you must exit your loop.




More information about the Info-vax mailing list