Hi Graham,

Taking your questions in order:

1 -  Deleting a data set

PARA1:
   F1 = '"ENCORE.CBL.SOURCE"'
   "DELETE "'F1'""   /* TRYING TO GET MY HEAD AROUND THESE QUOTE'Y THINGS */
   RC_REASON = 'DELETE 'F1; CALL RETCODE
   RETURN

This code, using the TSO DELETE command will do the job without the need to.
pre-allocate.

The double quotes are there to ensure that the REXX interpreter does not
attempt to execute the DELETE command. The single quotes are there to
inhibit TSO prefix, which if turned on would prefix the data set name in
variable F1 with the prefix held in the TSO PROFILE.

I notice that in RETCODE it is RC that is tested no RC_REASON. To be safe it
would be better to test RC_REASON in RETCODE in case RC has been changed
before arrival.

2 - Allocating the data set

As Elardus mentioned I would use the built-in Function SYSDSN to check data
set status before attempting the allocate.
As far as the allocate goes the ultimate disposition of the data set is
missing. With only NEW coded the data set will be created, then deleted. To
be kept it would be better to add CATALOG. SYSDSN will provide a textual
response which will 
help understand the state of the data set, i.e. it may be allocated but
ENQ'd by another task.

3 - Reading the member

The issue with file processing is how much data is being processed. One
thing for certain is that EXECIO 1 is the most inefficient method as the
EXECIO code will be entered for each and every record. If the member is
small then think about EXECIO * which will read all the members in one go,
which will avoid the need for the loop, and allow the file to be closed at
the same time by the addition of FINIS to the EXECIO options; i.e.

"EXECIO * DISKR INFILE1 (FINIS"
 
Note that EXECIO returns RC = 2 at end-of-file.

4 - I/O Processing differences.

It could be argued that I/O processing differences between TSO and ooREXX
are a strength rather than a weakness. It is this difference which allows
REXX to be so portable. That said z/VM REXX provides two I/O processing
methods one using EXECIO and the other using stream commands like ooREXX.

Kind Regards - Terry
 
Director
KMS-IT Limited
228 Abbeydale Road South
Dore
Sheffield
S17 3LA
UK
 
Reg : 3767263
 
Outgoing e-mails have been scanned, but it is the recipients responsibility
to ensure their anti-virus software is up to date.
 
 


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to