× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



 Zak:

 Here is how I used to do it before FTP:

----------------------------------------------------------------------------
------------------
 Command source for command CPYSAVF:

 /********************************************************************/
 /*
*/
/*    Copy Save File from/to a data base file  (CPYSAVF)
*/
/*
*/
/********************************************************************/

              CMD        PROMPT('Copy Save File')

 /*  From database/save file LIBRARY/FILE.                           */

              PARM       KWD(FROMFILE) TYPE(FILE1) SNGVAL((*NONE)) +
                           MIN(1) PROMPT('From file')

 /*  From file type (*SAVF, *DB)                                     */

              PARM       KWD(FROMTYPE) TYPE(*CHAR) LEN(5) RSTD(*YES) +
                           DFT(*SAVF) SPCVAL((*DB D) (*SAVF S)) +
                           PROMPT('From file type')

/*  To database/save file LIBRARY/FILE.                             */

              PARM       KWD(TOFILE) TYPE(FILE1) SNGVAL((*NONE)) +
                           MIN(1) PROMPT('To file')

 /*  To file type (*SAVF, *DB)                                       */

              PARM       KWD(TOTYPE) TYPE(*CHAR) LEN(5) RSTD(*YES) +
                           DFT(*DB) SPCVAL((*DB D) (*SAVF S)) +
                           PROMPT('To file type')

 /*  Create the TO file?                                             */

              PARM       KWD(CREATE) TYPE(*CHAR) LEN(4) RSTD(*YES) +
                           DFT(*NO) VALUES(*NO *YES) SPCVAL((*NO N) +
                           (*YES Y)) MAX(1) PROMPT('Create to-file?')

  FILE1:      QUAL       TYPE(*NAME) MIN(1)
                   QUAL       TYPE(*NAME) LEN(10) DFT(*LIBL) +
                      SPCVAL((*LIBL)) PROMPT('Library name:')

---------------------------------------------- -----------------------------
-------------------------
 Source for Command Processing Program JCPYSAVF:

 /***********************************************************************/
/*
*/
 /***********************************************************************/

             PGM        PARM(&FROM &FROMTYPE &TO &TOTYPE &CREATE)

             DCL        VAR(&FROM) TYPE(*CHAR) LEN(20)
             DCL        VAR(&FROMTYPE) TYPE(*CHAR) LEN(1)
             DCL        VAR(&TO) TYPE(*CHAR) LEN(20)
             DCL        VAR(&TOTYPE) TYPE(*CHAR) LEN(1)
             DCL        VAR(&CREATE) TYPE(*CHAR) LEN(1)

             DCL        VAR(&FROMFILE) TYPE(*CHAR) LEN(10)
             DCL        VAR(&FROMFILLIB) TYPE(*CHAR) LEN(10)
             DCL        VAR(&TOFILE) TYPE(*CHAR) LEN(10)
             DCL        VAR(&TOFILLIB) TYPE(*CHAR) LEN(10)

             DCL        VAR(&ERRORSW) TYPE(*LGL) /* Std err */
             DCL        VAR(&MSGID) TYPE(*CHAR) LEN(7) /* Std err */
             DCL        VAR(&MSGDTA) TYPE(*CHAR) LEN(100) /* Std err */
             DCL        VAR(&MSGF) TYPE(*CHAR) LEN(10) /* Std err */
             DCL        VAR(&MSGFLIB) TYPE(*CHAR) LEN(10) /* Std err */
             DCL        VAR(&KEYVAR) TYPE(*CHAR) LEN(4) /* Std err */

                MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(STDERR1))

   /* Separate from-LIBRARY/FILE.                                     */

               CHGVAR     VAR(&FROMFILLIB) VALUE(%SST(&FROM 11 10))
                CHGVAR     VAR(&FROMFILE) VALUE(%SST(&FROM 1 10))

   /* Separate to-LIBRARY/FILE.                                       */

                CHGVAR     VAR(&TOFILLIB) VALUE(%SST(&TO 11 10))
                CHGVAR     VAR(&TOFILE) VALUE(%SST(&TO 1 10))

   /* Check for existence of From-LIBRARY/FILE.                       */

                CHKOBJ     OBJ(&FROMFILLIB/&FROMFILE) OBJTYPE(*FILE)

   /* If CREATE=Yes is specified, create the to-file.               */
   /*    If TYPE=Data file, create a physical file.                 */
   /*    If TYPE=Save file, create a save file.                     */

              IF         COND(&CREATE *EQ 'Y') THEN(DO)
                 IF         COND(&TOTYPE *EQ 'D') THEN(DO)
                    CRTPF      FILE(&TOFILLIB/&TOFILE) RCDLEN(528)
                 ENDDO
                 IF         COND(&TOTYPE *EQ 'S') THEN(DO)
                    CRTSAVF    FILE(&TOFILLIB/&TOFILE)
                 ENDDO
              ENDDO

 /* Check for existence of to-LIBRARY/FILE.                       */

              CHKOBJ     OBJ(&TOFILLIB/&TOFILE) OBJTYPE(*FILE)
              MONMSG     MSGID(CPF0000) EXEC(DO)
                 GOTO       CMDLBL(STDERR1)
              ENDDO

 /* If the to-file is a SAVE file, clear it with CLRSAVF.         */

              IF         COND(&TOTYPE *EQ 'S') THEN(DO)
                 CLRSAVF    FILE(&TOFILLIB/&TOFILE)
              ENDDO

 /* If the to-file is a Data file, clear it with CLRPFM.          */

              IF         COND(&TOTYPE *EQ 'D') THEN(DO)
                 CLRPFM     FILE(&TOFILLIB/&TOFILE)
              ENDDO

 /* Override files used by RPG program.                           */

              OVRDBF     FILE(XXFROMF) TOFILE(&FROMFILLIB/&FROMFILE)
              OVRDBF     FILE(XXTOF) TOFILE(&TOFILLIB/&TOFILE)

              CALL       PGM(PCPYSAVF)

              DLTOVR     FILE(XXFROMF)
              DLTOVR     FILE(XXTOF)

              GOTO       CMDLBL(STEP99)

  STDERR1:               /* Standard error handling routine */

              IF         COND(&ERRORSW) THEN(SNDPGMMSG MSGID(CPF9999) +
                           MSGF(QCPFMSG) MSGTYPE(*ESCAPE)) /* Func +
                           chk */

              CHGVAR     VAR(&ERRORSW) VALUE('1') /* Set to fail if +
                           error occurs */

  STDERR2:    RCVMSG     MSGTYPE(*DIAG) KEYVAR(&KEYVAR) +
                           MSGDTA(&MSGDTA) MSGID(&MSGID) MSGF(&MSGF) +
                           MSGFLIB(&MSGFLIB)

              IF         COND(&KEYVAR *EQ '    ') THEN(GOTO +
                           CMDLBL(STDERR3))

              SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +
                           MSGDTA(&MSGDTA) MSGTYPE(*DIAG)

              GOTO       CMDLBL(STDERR2) /* Loop back for addl +
                           diagnostics */

  STDERR3:    RCVMSG     MSGTYPE(*EXCP) MSGDTA(&MSGDTA) MSGID(&MSGID) +
                           MSGF(&MSGF) MSGFLIB(&MSGFLIB)

              SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +
                           MSGDTA(&MSGDTA) MSGTYPE(*ESCAPE)

 STEP99:

              ENDPGM

------------------------------------------ ---------------------------------
----------------------
 Source for RPG program PCPYSAVF:

      F*******************************************************
      F*
      F*******************************************************
      FXXFROMF IP  F        528            DISK
      FXXTOF      O   F        528            DISK                      A
      E                    AR1       528  1
      IXXFROMF NS  01
      I                                        1 528 AR1
      C                     EXCPTREC
      OXXTOF   EADD             REC
      O                         AR1      528

 ------------------------------------------ --------------------------------
---------------------

 This command/program takes advantage of the fact that a save file can be
 read from and written to by an
 RPG program, just like a data file.  Assuming that they have Client Access
 and the RPG compiler on their system, you can:

 1)  Save the objects that you wish to save to a save file.  For example
 purposes, lets call it SJLSAVF.

 2)  Use FTP to transfer this file to you PC as usual to a file named
SJLDTA.

 3)  Send this file to the client via email, along with the source for this
 command, CLP, and RPG pgm.

 4)  Have them upload these source members to their system and compile the
Command, CLP, and RPG pgm.  You could even send them the source for a CLP at
they can compile and call that would perform the compiles for them and
create everything properly.

 5)  Have them transfer this file (SJLDTA) to their AS/400 using Client
Access file transfer, specifying No Conversion as the file type and record
length 528 when uploading the file to their machine.

 7)  Once they have created the data file file on their system, they can use
the command

      CPYSAVF FROMFILE(LIBNAME/SJLDTA) FROMTYPE(*DB) TOFILE(LIBNAME/SJLSAVF)
      TOTYPE(*SAVF) CREATE(*YES)

      it will create the target save file and copy the data file back into
the save file so the library/objects
     can be restored using the RSTXXX commands.

 I'm not sure that this will help, but...it's the best I can offer you!



 ----- Original Message -----
> From: "Metz, Zak" <Zak_Metz@G1.com>
> To: <midrange-l@midrange.com>
> Sent: Wednesday, September 11, 2002 3:49 PM
> Subject: Getting a SAVF to a system without TCP/IP
>
>
> > This message is in MIME format. Since your mail reader does not
understand
> > this format, some or all of this message may not be legible.
> > --
> > [ Picked text/plain from multipart/alternative ]
> > Our company distributes fixes over the Internet in the form of a zipped
> > savefile. Customers receive the file, unzip it, and FTP it in binary
into
> a
> > savefile on their system and do a rstobj from there.
> >
> > However, we have a couple customers who don't have TCP/IP. We're trying
to
> > avoid cutting CDs to allow them to simply rstobj from the CD (we have
the
> > software to create such CDs, though).
> >
> > So, we need to provide a way for customers without TCP/IP to get these
> > savefiles to the system. The idea occurred to me that they could burn
the
> > savefile to a CD on a PC, then use FTP to localhost to pull it from the
CD
> > via the IFS /QOPT directory into a savefile, but this would require the
> FTP
> > server to be running. If the customer doesn't have TCP/IP configured or
> even
> > a NIC, can the FTP server be started to allow this? Any other ideas?
> > NOTICE:  This E-mail may contain confidential information.  If you are
not
> > the addressee or the intended recipient please do not read this E-mail
and
> > please immediately delete this e-mail message and any attachments from
> your
> > workstation or network mail system. If you are the addressee or the
> intended
> > recipient and you save or print a copy of this E-mail, please place it
in
> an
> > appropriate file, depending on whether confidential information is
> contained
> > in the message.
> >
> > _______________________________________________
> > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
> list
> > To post a message email: MIDRANGE-L@midrange.com
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> > or email: MIDRANGE-L-request@midrange.com
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/midrange-l.
> >
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.