Script

FTP

The professional tool to automate FTP, SFTP, FTPS

and schedule FTP batch jobs

MENU MENU
Post here if you experience file transfer problems or unexpected errors.
I've been downloading a file from an IBM mainframe with the name:

'pedt.d856.ssneid.city.extr(0)'

without incident using version 3.3

GETFILE2("'pedt.d856.ssneid.city.extr(0)'","ssneid.raw")
Downloading................. 'pedt.d856.ssneid.city.extr(0)' as ssneid.raw

The same command started failing when I upgraded to version 4.1

GETFILE2("'pedt.d856.ssneid.city.extr(0)'","ssneid.raw")
Downloading..........'pedt.d856.ssneid.city.extr(0)'
****** GETFILE2 Error #16008
****** Server reports current directory as a relative path. Multi-file operations cannot be used with this server. Changing directory to an absolute path first could help to solve this problem.

Is there something I have to do in version 4.1 that would fix this issue?

Thanks,

John

Some history for those who are curious

For those who are intertest, the files that I am getting from an IBM mainframe are part of a Generation Data Group (GDG). This is just a fancy way of saying "file versioning." For example, a GDG for my files could be

'pedt.d856.ssneid.city.extr.g0001v00'
'pedt.d856.ssneid.city.extr.g0002v00'
'pedt.d856.ssneid.city.extr.g0003v00'
'pedt.d856.ssneid.city.extr.g0004v00'
'pedt.d856.ssneid.city.extr.g0005v00'

When you change the contents of a file, it does not overwrite the existing file, but rather creates another version. This comes in handy when you have to go back to an earlier draft. To access a version of a file, you could specify the full name including the "g00v00" number, such as

'pedt.d856.ssneid.city.extr.g0002v00'

or you could use shortcuts:

'pedt.d856.ssneid.city.extr(0)' // most recent = 'pedt.d856.ssneid.city.extr.g0005v00'
'pedt.d856.ssneid.city.extr(-1)' // one earlier than the most recent = 'pedt.d856.ssneid.city.extr.g0004v00'
'pedt.d856.ssneid.city.extr(-2)' // two earlier than the most recent = 'pedt.d856.ssneid.city.extr.g0003v00'

And, yes, the single-quotes are necessary.
Hi,

Could you test GETFILE2 in version 4.1 using OUTPUTDETAIL(VERBOSE) ?
You need to put this before GETFILE2. This way I can see what path your server reported.

This is probably a problem of ScriptFTP that need to be fixed for the next release. Looks a bug to me but need to see the output with more details.

If you want more privacy regarding to what your server says etc. feel free to send me an email
Hi,

Here is the output from the OUTPUTDETAIL(VERBOSE) command
Code: Select allGETFILE2("'pedt.d856.ssneid.city.extr(0)'","ssneid.raw") [ScriptFTP] NOP [Server ] 500 unknown command NOP [ScriptFTP] PWD [Server ] 257 "'PC0FMA.'" is working directory. Downloading..........'pedt.d856.ssneid.city.extr(0)' [ScriptFTP] PWD [Server ] 257 "'PC0FMA.'" is working directory. [ScriptFTP] CWD 'PC0FMA.'/ [Server ] 501 Mismatched quotes on directory name "'PC0FMA.'/". ****** GETFILE2 Error #16008 ****** Server reports current directory as a relative path. Multi-file operations cannot be used with this server. Changing directory to an absolute path first could help to solve this problem.
Thanks,

John