FTP GET to run IBM host job

Advertisement

Darvin2016
Joined:
Posts:
2
Location:
Italy

FTP GET to run IBM host job

Hello
I need help on an unusual task to perform using Winscp .NET library (version 5.7.7).
This is how it looks like from Windows Commandline FTP client:
...
ftp> QUOTE SITE FILETYPE=JES
200 SITE command was accepted
ftp> GET 'X1.LTZ.FT.JCL($FX983C0)'
200 Port request OK.
125-Submitting job 'X1.LTZ.FT.JCL($FX983C0)' FIXrecfm 80
125 Unable to send X1.LTZ.FT.JCL($FX983C0)
550 Transfer aborted
ftp>
In spite of the message "550 Trasfert aborted" it run some job on host and doesn't return any data.

I'm trying to move those commands on my new .NET exe based on Winscp library.
It works fine until it has to execute:
TransferResult = mySessionBMP.GetFiles("'X1.LIZ.FT.JCL($FX983C0)'", ".\FTPUCBesito" & Now().ToString("yyyyMMddHHmmss") & ".txt", False, myTransferOption)
it fails with the error:
  <group name="get  -nopermissions -nopreservetime -transfer=&quot;ascii&quot; -- &quot;/'X1.LIZ.FT.JCL($FX983C0)'&quot; &quot;.\FTPUCBesito20160601114526.txt&quot;" start="2016-06-01T09:45:26.418Z">
    <failure>
      <message>Can't get attributes of file ''X1.LIZ.FT.JCL($FX983C0)''.</message>
      <message>File or folder ''X1.LIZ.FT.JCL($FX983C0)'' does not exist.</message>
    </failure>
  </group>

Ok, I'm aware the file doesn't exists, it's a sort of virtual file. Just I'm looking for a way to tell Winscp to try to get it without any check on remote file.
Is it possible? Any other idea to get that job done?

Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,791
Location:
Prague, Czechia

Re: FTP GET to run IBM host job

It won't work. WinSCP will always try to determine if the "name" is a file or a directory.

Reply with quote

Ijsbees
Guest

Possible to submit JCL with winSCP?

Hi,

I used submit JCL with FTP(example below). Is there any way to do this with winSCP?

Thanks in advance.
Regards,
Mike.

FTP example:

ftp
open servername
user
password
quote site filetype=jes
mdel *.*
put c:\jcl.txt
ls
disconnect
quit

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,791
Location:
Prague, Czechia

Re: Possible to submit JCL with winSCP?

Ijsbees wrote:

I used submit JCL with FTP(example below). Is there any way to do this with winSCP?
What "this"? Are you referring to the quote site filetype=jes?
For WinSCP, use call instead of quote:
https://winscp.net/eng/docs/scriptcommand_call
https://winscp.net/eng/docs/guide_ftp_script_to_sftp#quote

EDIT: Your duplicate post on Stack Overflow:
https://stackoverflow.com/q/53517943/850848

Reply with quote

Advertisement

ijsbees
Guest

Hi Martin,

Thanks for your answer. What I meant was, if it's possible to put a (jcl)file on the JES queue on Z with winscp?

Regards,
Mike.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,791
Location:
Prague, Czechia

ijsbees wrote:

Thanks for your answer. What I meant was, if it's possible to put a (jcl)file on the JES queue on Z with winscp?
I do not know anything about JES queue.
Can you just try and report your results?
There's a guide for converting ftp script to WinSCP script:
https://winscp.net/eng/docs/guide_ftp_script_to_sftp

Reply with quote

Advertisement

You can post new topics in this forum