We have stopped using FTP for security reasons and are using SFTP instead. FTP was the way I transferred save files between the iSeries and PC's. Is there a another way I can do this?
Announcement
Collapse
No announcement yet.
Transfer save files
Collapse
X
-
Re: Transfer save files
I've done savefile transfers through IFS streamfiles for many years and have thought it's been the easiest way to do it. To start, here are two basic commands that convert a savefile to a streamfile and back to a savefile:
Code:CPYTOSTMF FROMMBR( '/qsys.lib/mylib.lib/mysavf.file' ) TOSTMF( mysavf.savf ) STMFOPT( *REPLACE ) CPYFRMSTMF FROMSTMF( mysavf.savf ) TOMBR( '/qsys.lib/mylib.lib/mysavf.file' ) MBROPT( *REPLACE )
The two examples use relative paths to write to or read from the job's current directory, but absolute paths work the same.
I almost always have a savefile named SAVF in my current library. I use it regularly as a quick way to store or retrieve saved items. You can create a savefile, save something into it, run the two commands (after setting the names appropriately) and review the results. If you change the name for the TOMBR() parameter when you run CPYFRMSTMF, you can compare the result to the original. I keep copies of the commands in "CL" source members for easy copy/paste.
Once in a streamfile in a shared directory, it's easy to drag/drop from a PC, to transfer with sftp or to manipulate in other ways. As long as the *.SAVF extension is kept and you don't pass it through methods that will try to do EBCDIC/ASCII or other conversions, there's really very little that needs to be done.Tom
There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.
Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
Comment
-
Re: Transfer save files
For me, it's often because I don't often have FTP methods at all. Such servers might not be active. But I can almost always access specific shared directories to use simple copy/paste methods for network movement. Without something like a FTP server (and other times even sftp) to give IFS naming to the outside, it doesn't matter if such a server can do it.
At times it's for archiving, other times to carry on a flash drive or other means.
I can get it into a form handy for PC/UNIX/Linux manipulation all on my system. And it's just simple, is all there is to it. If FTP/sftp can be easily used, there might be no reason.Tom
There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.
Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
Comment
-
Re: Transfer save files
It'd be unusual to access files directly in "QSYS.LIB", but maybe it's just unclear. By itself, "QSYS.LIB" mostly refers to the QSYS library. But it's also a reference to the /QSYS.LIB file system, and all libraries are accessed as subdirectories under /QSYS.LIB.
If you have a file in a library named QGPL, it would appear under the /QSYS.LIB/QGPL.LIB path. If you have a savefile named MYSAVF in library LBURKETT, the path to it would be /QSYS.LIB/LBURKETT.LIB/MYSAVF.FILE.Tom
There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.
Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
Comment
-
Re: Transfer save files
Your reply questioned the need to copy a save file to a stream file, that it was directly accessible using SFTP. In my question to you I said I could only see physical files in qsys.lib, not save files. When I said qsys.lib I was referring to the entire qsys file system. Again, what method do you use to observe save files in the qsys file system using SFTP?
Comment
Comment