Hi Steve,

Just an attempt to write it without my VM available:

'PIPE COMMAND LISTFILE 'fn ft fm' (NOH',
' | specs /ERASE/ 1 w1-3 nw /(TYPE/ nw',
' | command',
' | console'

1. Obviously, command LISTFILE can also be < filename, provided the file
contains the same output as LISTFILE.
2. Specs prepares the filenames for deleting.
3. command executes the erase commands for every file from LISTFILE.
4. Since erase has option type, the output is available after the
command stage so you can use it to console or whatever action you want
to do next.

Regards, Berry.

Op 20-09-10 21:22, Steve Perez schreef:
> Hello Listers,
>
> I have the following scenario and would like to know how some of you would 
> go about doing it using REXX Pipeline. If you have an example, that would 
> be great too.
>
> Scenario:
>
> 1. Read a file ( PIPE < fn ft fm | )
> 2. Select specified records with D* T* fm (format of each row is: fn ft fm)
> 3. Issue the CMS command to ERASE the file
> 4. If the ERASE command issued for each file completed successfully, I 
> want to output the fn ft fm to the CONSOLE with a 'success' message OR 
> write the fn ft fm to a SUCCESS FILE.
> 5. However if the ERASE command failed for a file, I want to output that 
> fn ft fm to the CONSOLE with an error message OR write the fn ft fm to a 
> FAILED FILE.
>
> I know I probably will need to create multistream pipelines.  Can all the 
> above be performed in one PIPE instance or several PIPE instance?
>
> The above is just a small section of a larger REXX EXEC doing automation 
> of mini-disk checking of files and clean-up.
>
> Any and all assistance will be appreciated.
>
> Thanks,
> Steve.
>
>
>   

Reply via email to