Someone wanted me to pose this question to the List.
How, if possible, do you call FTP from a COBOL program?
TIA
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to list...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Carol Srna <carol...@LA-Z-BOY.COM> wrote:
How, if possible, do you call FTP from a COBOL program?
---------------------------------------------------------------------------------------
Carol, you have to write a small assembler program and issue the ATTACH macro to attach the FTP program. This is required because the FTP program needs to run in POSIX(ON) mode - see PQ28381. Then you CALL the assembler program from COBOL passing the HOSTNAME as the only parameter. All other ftp parameters are read in from the //INPUT DD statement. I have some code if you require it.
Jim McAlpine
---------------------------------
Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now
-----Original Message-----
From: Carol Srna [mailto:carol...@ibm-main.LA-Z-BOY.COM]
Sent: Wednesday, March 17, 2004 9:41 AM
To: IBM-...@BAMA.UA.EDU
Subject: FTP from COBOL
Hello Gentle Listers.
Someone wanted me to pose this question to the List.
How, if possible, do you call FTP from a COBOL program?
TIA
Visit www.search390.com and do a search for ftpfront (upper right).
You'll get 3 hits consisting of my tips and a Q&A that include COBOL
code to invoke FTP.
They are:
OOP ACK ACK Fttttttpppppppppppppppppppppp!!!!!!!!!
at <http://search390.techtarget.com/tip/1,289483,sid10_gci550566,00.html>.
Horrible things COBOL can do with IDCAMS!
at <http://search390.techtarget.com/tip/1,289483,sid10_gci539649,00.html>.
Can FTP be called from a COBOL 390 program?
at
<http://search390.techtarget.com/ateQuestionNResponse/0,289625,sid10_cid519769_tax285123,00.html>.
- Jim
I was able to bypass this problem with COBOL invoking FTP without the
need of an assembler subroutine noir any multi-tasking. I changed the COBOL
code, when dynamically CALLing FTP, to pass a PARM like
'POSIX(OFF) / SERVER.NODE (EXIT'
The POSIX(OFF) did the trick.
See code in:
OOP ACK ACK Fttttttpppppppppppppppppppppp!!!!!!!!!
at <http://search390.techtarget.com/tip/1,289483,sid10_gci550566,00.html>.
Also see ***LATE FLASH*** code appended at bottom of:
Horrible things COBOL can do with IDCAMS!
at <http://search390.techtarget.com/tip/1,289483,sid10_gci539649,00.html>.
- Jim
At 10:16 2004-03-17, you wrote:
>Carol Srna <carol...@LA-Z-BOY.COM> wrote:
>
>How, if possible, do you call FTP from a COBOL program?
>---------------------------------------------------------------------------------------
>
>Carol, you have to write a small assembler program and issue the ATTACH
>macro to attach the FTP program. This is required because the FTP program
>needs to run in POSIX(ON) mode - see PQ28381. Then you CALL the assembler
>program from COBOL passing the HOSTNAME as the only parameter. All other
>ftp parameters are read in from the //INPUT DD statement. I have some
>code if you require it.
>
>Jim McAlpine
>
>
>
>---------------------------------
> Yahoo! Messenger - Communicate instantly..."Ping" your friends today!
> Download Messenger Now
>
Jim Keohane <jim...@MULTI-PLATFORMS.COM> wrote:
I was able to bypass this problem with COBOL invoking FTP without
the need of an assembler subroutine noir any multi-tasking. I changed the COBOL code, when dynamically CALLing FTP, to pass a PARM like
'POSIX(OFF) / SERVER.NODE (EXIT'
The POSIX(OFF) did the trick.
--------------------------------------------------------------------------------------------------
Jim, well that's strange because PQ28381 says that the FTP client has to run in POSIX(ON) mode and I remember finding that apar because I got the exact same symptoms described by it. However, running with POSIX(OFF) does now work as your tip says. I can only think that the behaviour has changed. It was some years ago when I first tried it.