Newsgroups: bit.listserv.vm-util
Date:         Thu, 30 Jul 1992 23:33:07 CST
From:         Jim Colten <IJIM@UMINN1.BITNET>
Subject:      Re: NETDATA File Creation Program

On Thu, 30 Jul 1992 14:50:47 PDT Dwight M. McCann said:
>I need to be able to punch a netdata format file from data in my reader
>(which may be netdata, print or punch) for files that are too large to
>fit on available disk or in virtual memory.  That is, I need a program
>or subroutine that can read a record (or so) from the reader and then
>punch a record (or so) in netdata format, then read, then punch, etc,
>without recourse to disk.
>
>The need for the netdata requirement for output is that these files are
>being sent to MVS via RSCS and the records may be quite large.  Alternate
>suggestions are welcome.
>
>Dwight

Well, if the original file already happens to be in NETDATA format, just use

       CP TAG FILE nnnn node userid

and then transfer the spoll file to RSCS.  But, I suspect that isn't your
situation.

A pipelines solution has been proposed.  It was in the right neighborhood but
complete NETDATA format for a file is somewhat complex and requires more than
BLOCK NETDATA does on its own.  However, if you do have pipes, look on the
the product disk (CMSPIPES 193 disk unless you have learned to defeat the
somewhat stubborn install exec).  You will find INMR123 EXEC and INMR123 REXX.
These can be used to construct complete netdata files.

I have used this to send files to a second level VM system without having to
setup RSCS and a VCTCA.  The EXEC that does that is included at the end
of this note.  I think it is straight forward enough to understand.

What you will have to do is:

 1) construct the pipeline specification that will deliver just the data
    part of the spool file.
 2) provide node and userid info for the destination
 3) manufacture information about the file in the format that LISTFILE
    would provide if the data were a disk file.
 4) SPOOL the PUNCH to RSCS and tag it properly.

Jim Colten

p.s.  If you have never had the pleasure of using a real card reader with VM,
      then the business about 'making an ID card and punching it' may be new
      to you.  Just throw it away, it does not belong in your application.

/* Send a file to a userid on LEVEL2VM, in NETDATA (sendfile) format*/
Trace N
Signal On Novalue
Address Command

Arg who fn ft fm .                    /*get args                     */

If fm = '' Then                       /* filemode defaults to *      */
    fm = '*'

If ft = '' Then                       /* all other args are required */
  Exit 24

'PIPE(name FILEINFO)',
   '  CMS LISTFILE' fn ft fm'(DATE NOH',  /* info about the file     */
   '| var fileinfo'                       /*       into a var        */

'CP SPOOL PUN LEVEL2VM'               /* punch into the level 2 rdr  */

'PIPE(name IDRECORD)',
   '  literal ID' who,                /* make an ID card             */
   '| punch'                          /*     and punch it            */


Call inmr123,
     '<' fn ft fm,,                   /* source of data to send      */
     'UMINN1' who,,                   /* info about destination      */
     fileinfo,                        /* info about the data         */
     '(NOSPOOL'                       /* let us do the SPOOL cmds    */

'CP SPOOL PUN CLOSE'                  /* close that punch file       */
'CP SPOOL PUN SYSTEM'
Exit
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU