Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

nhf1ers

Using Winscp script to submit JCL to JES on IBM Mainframe

I have tried to convert the ftp key word quote to use call in this script:
@echo off
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="D:\DATA\log\SendJCL.log" /ini=nul ^
/command ^
"open ftpes://UID:PWD@my.mvs.com/" ^
"Call site filetype=jes" ^
"put -transfer=Ascii d:\data\jcl\MyJOB.JCL" ^
"exit"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%
It stops after the open statement with a WinSCP command prompt
I then paste the call command at the prompt: winscp>Call site filetype=jes ^
then paste the Put command at the prompt: winscp>put -transfer=Ascii d:\data\jcl\JOB.JCL" ^
and the job is submitted successfully.
I Cannot figure out why it is not processing the entire script automatically
any help is appreciated