|
Pretty much what Vern said. We use a program like this on our iSeries PGM ( + &REMOTE /* Name of remote PC. */ + &USER /* Name of user on remote PC. */ + &PASSWORD /* User's password on remote PC. */ + ) DCL &CMD *CHAR 200 /* Command to run */ DCL &CONTROLPC *CHAR 15 /* PC controller. */ DCL &FILELIB *CHAR 10 /* Name of file library */ DCL &HIKEY *CHAR 4 /* Highest message key */ DCL &KEYVAR *CHAR 4 /* Message key variable */ DCL &LOWKEY *CHAR 4 /* Lowest message key */ DCL &MSG *CHAR 256 /* Message description */ DCL &MSGDTA *CHAR 512 /* Message field data */ DCL &MSGDTASND *CHAR 512 /* Message field data */ DCL &MSGF *CHAR 10 /* Message file name */ DCL &MSGFLIB *CHAR 10 /* Library containing message file */ DCL &MSGID *CHAR 7 /* Error message id */ DCL &MSGKEY *CHAR 4 /* Current message key */ DCL &MSGRPY *CHAR 1 /* Reply to message */ DCL &MSGSENDER *CHAR 80 /* Who responded to a message? */ DCL &PASSWORD *CHAR 10 /* Remote password */ DCL &REMOTE *CHAR 10 /* Remote system name */ DCL &SUBJECT *CHAR 44 /* Subject of distribution */ DCL &USER *CHAR 10 /* Remote user id */ DCL &FACIL *CHAR 2 /* Facility Code */ DCL &FILNAM *CHAR 10 /* FILE NAME */ DCL &FILMBR *CHAR 10 /* FILE MEMBER */ DCL &LOCK *CHAR 1 SETUP: RTVDTAARA DTAARA(SSASYS (170 10)) RTNVAR(&FILELIB) /* + | Execute command on PC to upload file. + */ ATTEMPT: /* + | Determine starting message key. This will allow us to + | retrieve the diagnostic message. + */ SNDPGMMSG MSG(TEST) TOPGMQ(*SAME) KEYVAR(&LOWKEY) RMVMSG MSGKEY(&LOWKEY) /* + | Clear out any existing data. + */ /* CLRPFM FILE(&FILELIB/&REMOTE) MBR(&REMOTE) */ IF COND(&REMOTE = 'PVC23') THEN(DO) CHGVAR VAR(&FILNAM) VALUE('PVC3') ENDDO ELSE CMD(DO) CHGVAR VAR(&FILNAM) VALUE(&REMOTE) ENDDO CLRPFM FILE(&FILELIB/&FILNAM) MBR(&FILNAM) /* + | UPLOAD.BAT performs the following tasks: + | 1-Convert the PC data from Access into Comma Seperated + | Variable via a program that Glenn Kump wrote. + | 2-Upload the file into the library. Check out the + | program \PVC4XX\PVCMDB.TFR on the PC. + | I recommend setting it up so that the file uploaded + | is named after the PC. For example PVC3. This will allow + | the use of the variable &REMOTE. + */ /* IF COND(&REMOTE = 'PVC3') THEN(DO) */ IF COND(&REMOTE = 'PVC23') THEN(DO) CHGVAR VAR(&CMD) VALUE('D:\PVC4XX\UPLOAD.BAT') /* CHGVAR VAR(&CONTROLPC) VALUE('PVC3') */ CHGVAR VAR(&CONTROLPC) VALUE('PVC23') ENDDO ELSE CMD(DO) CHGVAR VAR(&CMD) VALUE('D:\PVC4XX\' *TCAT &REMOTE + *TCAT '.BAT') /* CHGVAR VAR(&CONTROLPC) VALUE('PVC1') */ CHGVAR VAR(&CONTROLPC) VALUE('PVC20') ENDDO /* Give the remote commands 5 minutes to complete. LTS02 */ /* If the remote job returns, cancel the kill order. LTS02 */ /* LTS03d KILLJOB DLY(300) LTS02*/ KILLJOB DLY(600) /*LTS03a*/ PING RMTSYS(&CONTROLPC) MSGMODE(*QUIET *ESCAPE) MONMSG MSGID(TCP3210 TCP3202) EXEC(GOTO CMDLBL(ALERT)) /*PM002*/ OVRPRTF FILE(QSYSPRT) + OUTQ(*LIBL/BPCSOUTQ) + HOLD(*YES) /*LTS02d KILLJOB DLY(300) LTS01*/ RUNRMTCMD CMD(&CMD) + RMTLOCNAME(&CONTROLPC *IP) RMTUSER(&USER) + RMTPWD(&PASSWORD) MONMSG MSGID(CPF91CC) EXEC(GOTO CMDLBL(CPF91CC)) KILLNOT /*LTS01*/ GOTO CMDLBL(UPLOADED) ... Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com "Bill Neill" <BillNeill@xxxxxxxxx> Sent by: midrange-l-bounces@xxxxxxxxxxxx 02/18/2004 09:04 AM Please respond to Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> To "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx> cc Fax to Subject RE: iSeries access for Windows Rob: Thanks for the reply. What are the commands to be run? -----Original Message----- From: rob@xxxxxxxxx [mailto:rob@xxxxxxxxx] Sent: Wednesday, February 18, 2004 8:54 AM To: Midrange Systems Technical Discussion Subject: Re: iSeries access for Windows To start a process on the iSeries from the PC you need: 1-Check, via iSeries Navigator that Remote Command service is running under TCP/IP. 2-Either use the iSeries Access command RMTCMD, or start a FTP session and use QUOTE RCMD SBMJOB.... or other command here... To start a process on the PC from the iSeries you need: 1 - iSeries access loaded on the PC and the remote command service started 2 - Use the RUNRMTCMD from the iSeries Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com "Bill Neill" <BillNeill@xxxxxxxxx> Sent by: midrange-l-bounces@xxxxxxxxxxxx 02/18/2004 08:42 AM Please respond to Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> To <midrange-l@xxxxxxxxxxxx> cc Fax to Subject iSeries access for Windows I have a task where in I need to automate a file download from a PC to an iSeries at V5.2 and again in the oposite direction as a monthly routine. Only the names of the to and from files will change. I did a cursory search in the archived and on the IBM site but came up empty handed for any examples of how to affect this process. Does anyone know where I can look for examples? Thanks in advance. Bill. _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx 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 mailing list archive is Copyright 1997-2025 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.