[comp.lang.rexx] creation-date of a readerfile

"Binder, Michael 0551/201-520" <MBINDER@DGOGWDG1.BITNET> (03/23/90)

Hello REXX-Users,

sometimes I would like to know the creation-date of a file currently
residing in my virtual reader. QUERY RDR ALL only shows the creation-
date of the spoolfile.
How can I do this without receiving the file?

thanks, Michael Binder at GWDG

KWEIDE@DGOGWDG1.BITNET (Klaus Weide) (03/29/90)

>sometimes I would like to know the creation-date of a file currently
>residing in my virtual reader. QUERY RDR ALL only shows the creation-
>date of the spoolfile.
>How can I do this without receiving the file?
>
I understand you mean the date of the original file on mindisk.
Whether you can get this information depends on the format of the
reader file.  See the helpfile for the RDR command:
If Rc = 4 from RDR, you get the file date/time in the reply.
This is for files created by the CMS command PUNCH (with the
HEADER-option in effect).

If Rc = 23 from RDR, you have a NETDATA file, and you can get
additional information by DMSDDL QUERY. (The command DMSDDL is
not in the helpfiles, but is used by SENDFILE EXEC and RECEIVE
EXEC to handle spoolfiles in NETDATA format. This is the normal
default format for SENDFILE, at least for sending to local
users.)

The commands RDR and DMSDDL QUERY give information on the NEXT
file in the reader queue, you cannot specify a spoolid.

So you could use the following small exec:

/* */
address 'COMMAND'
parse arg spoolid .
if datatype(spoolid,'W') then do    /* valid spoolid */
   'CP ORDER RDR' spoolid /* or call diag 8,ORDER RDR spoolid  to avoid IMSG */
                         /* this makes file the next one in the reader queue */
   if rc ^= 0 then exit rc
   end

'RDR'     /* it is assumed that (i) the reader is spooled CLASS * (default) */
          /*                        or the class of the spoolfile           */
          /*               and (ii) the spoolfile is not in any HOLD status */
          /* or do additional checks... */

if rc = 23 then 'DMSDDL QUERY'  /* or DMSDDL QUERY(LIFO   and then
                                   address 'XEDIT' "MSG" ...
                                   if called from RDRLIST ... */
exit rc