You can shorten the path by...
cd target_path
lcd local_path
namefmt 1
put mysavf.savf
This will auto generate the SAVF is missing or overlay it if found.
-Matt
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rob Berendt
Sent: Sunday, October 22, 2017 9:00 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: RE: [EXT] Re: FTP changes the record format name
quote rcmd
builds the save file on the remote system. The file on the local system was already populated.
Doing the CLRSAVF is in case the save file was already there when I tried to create it.
Nowadays I would skip creating it by ftping from NAMEFMT 1 instead of namefmft 0. If you use namefmt 0 you have to create the remote save file first.
namefmt 0
put fromlib/fromfile tolib/tofile
namefmt 1
put /qsys.lib/fromlib.lib/fromfile.savf /qsys.lib/tolib.lib/tofile.savf
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From: Danny Hayes <Danny_Hayes@xxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 10/20/2017 02:22 PM
Subject: RE: [EXT] Re: FTP changes the record format name
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>
Rob,
I have a couple of questions on your script:
* You create a savf and then you clear it? Are they not created
'clean'?
* Then you 'PUT' it without ever having added anything to it?
* On the last line it looks like you have 2 commands on that one
line, is that premitted?
I realize you probably just copied parts from a real script, but I just
wanted to make sure I wasn't missing something.
Thanks & Regards,
Danny Hayes
IT-Developer
Genuine Parts Company, APG IT
3100 Windy Hill Road
Atlanta, Georgia 30339
mailto:Danny_Hayes@xxxxxxxxx
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rob
Berendt
Sent: Friday, October 20, 2017 10:18 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: [EXT] Re: FTP changes the record format name
SOP is to save the file to a save file, ftp the save file, restore the
object from the save file.
You can script this
PGM PARM(&RMTSYSTEM)
DCL VAR(&RMTSYSTEM) TYPE(*CHAR) LEN(200)
OVRDBF FILE(INPUT) TOFILE(MYLIB/FTPSCRIPT)
OVRDBF FILE(OUTPUT) TOFILE(MYLIB/FTPOUTPUT)
FTP RMTSYS(&RMTSYSTEM)
DLTOVR FILE(INPUT)
DLTOVR FILE(OUTPUT)
CALL PGM(ANALYZER) /* Analyze FTP output */
ENDPGM
FTPSCRIPT may look something like
USRPRF
BIN
quote rcmd crtsavf file(ROB/ROB)
QUOTE RCMD CLRSAVF FILE(ROB/ROB)
PUT ROB/ROB ROB/ROB
quote rcmd RSTOBJ OBJ(SVRAUT SVRAUTR SVRAUTV) SAVLIB(ROUTINES) DEV(*SAVF)
OBJTYPE(*PGM *CMD) SAVF(ROB/ROB) quote rcmd clrsavf rob/rob QUIT
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail
to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From: "T. Adair" <tadair@xxxxxxxxxxxxxxxx<mailto:tadair@xxxxxxxxxxxxxxxx
To: midrange-l@xxxxxxxxxxxx<mailto:midrange-l@xxxxxxxxxxxx>
Date: 10/20/2017 10:01 AM
Subject: FTP changes the record format name
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx<
mailto:midrange-l-bounces@xxxxxxxxxxxx>>
When I FTP a PF from one System i to another, FTP will preserve the
filename and member name, but it (apparently always) changes the record
format name from whatever it was to the same as the filename.
Example:
PUT DS_DATA/DS_PRDXF.DS_PRDXF DS_DATA/DS_PRDXF.DS_PRDXF
This successfully puts the DS_PRDXF file in the DS_DATA library on the
source system, into the same file/library on the target system.
So far, so good. The problem is that the record format name on the
source system is DSPRDXFR, but FTP changes it to DS_PRDXF (same as the
filename) on the target system.
Why?
This file needs to be FTPed to multiple libraries on multiple systems. I
do not relish the thought of having to transfer the DDL source member to
each system, and then manually create the file in each library on every
system.
Is there an FTP setting to prevent this behavior? I've searched the
archives, and I've Gaagled it, without success. Does FTP simply not
ignore the record format name, and assign a default?
FTPing to the same library name (on a remote system) or to a different
library name makes no difference. Same result.
All our systems are on 7.2.
As always, any guidance would be greatly appreciated.
~TA~
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx<
mailto:MIDRANGE-L@xxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx<
mailto:MIDRANGE-L-request@xxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx<mailto:support@xxxxxxxxxxxx> for any
subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link:
http://amzn.to/2dEadiD
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx<
mailto:MIDRANGE-L@xxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx<
mailto:MIDRANGE-L-request@xxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx<mailto:support@xxxxxxxxxxxx> for any
subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link:
http://amzn.to/2dEadiD
"This e-mail and any attachments, contain Genuine Parts Company
confidential information that is proprietary, privileged, and protected by
applicable laws. If you have received this message in error and are not
the intended recipient, you should not retain, distribute, disclose or use
any of this information and you should destroy this e-mail, any
attachments or copies therein forthwith. Please notify the sender
immediately by e-mail if you have received this e-mail in error."
As an Amazon Associate we earn from qualifying purchases.