× 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.



Mike,

do you have the connection configured yet?   I didn't set up ours, but I
can display the configuration descriptions and give you those as well.

I don't know if this is the best way to do this, but here is the CL I use
to initiate the ptp connection.  It basically monitors the QTCP message
queue for TCP8344 which is 'connection started' for the comm device.

our line is set up to dial out, and it can take sometimes 2 or 3 minutes to
complete the connection.

once TCP8344 is recieved, i do the STRTCPPTP command, and exit the program
- another program does the FTP and the ENDTCPPTP command to drop the
connection.

hope this helps,

Rick




/*********************************************************************/
/*                                                                   */
/*     PROGRAM : MONPTPCL                                            */
/*     FUNCTION: start ptp connection and monitor for connect msg    */
/*     AUTHOR  : Rick Baird  - eSource Consulting                    */
/*                                                                   */
/*********************************************************************/

             PGM        PARM(&PARM1)

             DCL        VAR(&PARM1)  TYPE(*CHAR) LEN(32)
             DCL        VAR(&CFGPRF) TYPE(*CHAR) LEN(10)
             DCL        VAR(&MSGID)  TYPE(*CHAR) LEN(7)
             DCL        VAR(&ERROR)  TYPE(*CHAR) LEN(3)
             DCL        VAR(&COUNT)  TYPE(*DEC)  LEN(2 0) VALUE(0)

             CHGVAR     VAR(&CFGPRF) VALUE(&PARM1)

/* try to alloc msgq - if it fails, wait and try 50 times again */

 ALLOC:      ALCOBJ     OBJ((QTCP *MSGQ *EXCL)) WAIT(0)
             MONMSG     MSGID(CPF1002) EXEC(DO)
               CHGVAR     VAR(&COUNT) VALUE(&COUNT + 1)

/* couldn't allocate message queue.  end program            */

               IF         COND(&COUNT > 50) THEN(DO)
                 SNDPGMMSG  MSGID(CPF9897) MSGF(QCPFMSG) +
                          MSGDTA('MONPTPCL (' *CAT &PARM1 *TCAT +
                          ') was unsuccessful.  The QTCP +
                          message queue could +
                          not be allocated.') TOUSR(*SYSOPR)
                 CHGVAR     VAR(&PARM1) VALUE('ERROR')
                 GOTO       CMDLBL(ENDPGM)
               ENDDO

               GOTO       CMDLBL(ALLOC)
             ENDDO

             DLCOBJ     OBJ((QTCP *MSGQ *EXCL))

/* do priming reads on msgq, to clear any lingering messages*/

 READMSGQ1:  CHGVAR     VAR(&MSGID) VALUE(' ')

             RCVMSG     MSGQ(QTCP) WAIT(3) RMV(*NO) MSGID(&MSGID)

             IF         COND(&MSGID *NE '       ') THEN(DO)
               GOTO    CMDLBL(READMSGQ1)
             ENDDO

/* start p2p connection                   */

             STRTCPPTP  CFGPRF(&CFGPRF)
             CHGVAR     VAR(&COUNT) VALUE(0)

/* loop until msg TCP8344 (tcp started) is revieced       */

 READMSGQ2:  CHGVAR     VAR(&MSGID) VALUE(' ')

             RCVMSG     MSGQ(QTCP) WAIT(10) RMV(*NO) MSGID(&MSGID)

/* found the connect message, no error, ready to go      */

             IF         COND(&MSGID *EQ 'TCP8344') THEN(DO)
                CHGVAR     VAR(&PARM1) VALUE('        ')
                GOTO    CMDLBL(ENDPGM)
             ENDDO

/*  wait for connection message 80 times, then fail.       */

             CHGVAR     VAR(&COUNT) VALUE(&COUNT + 1)

             IF         COND(&COUNT *GT 80) THEN(DO)
               SNDPGMMSG  MSGID(CPF9897) MSGF(QCPFMSG) +
                          MSGDTA('MONPTPCL (' *CAT &PARM1 *TCAT ') +
                          was unsuccessful. STRTCPPTP command timed +
                          out before recieving the connect +
                          message.') TOUSR(*SYSOPR)
               CHGVAR     VAR(&PARM1) VALUE('ERROR')
               GOTO       CMDLBL(ENDPGM)
             ENDDO

             GOTO       CMDLBL(READMSGQ2)

/* connection has been established               */

 ENDPGM:     ENDPGM


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.