View previous topic :: View next topic |
Author |
Message |
Anand_R Intermediate
Joined: 24 Dec 2002 Posts: 189 Topics: 60
|
Posted: Thu Feb 20, 2003 10:28 am Post subject: ftp - path file is beyond 80 chars.. |
|
|
Hi..
I need help for continuation character in FTP process.. I have following ftp parameters.. I am running it thru batch job..
3.172.334.56 (Exit = 04
dc_ftp
dc_ftp
ASCII
PUT 'G1NX62T.DATA.TEST1' +
/ap03/warehouse/cefrisk/data_files/invfin_ca/ +
test.csv
QUIT
my job is abending with FTP Return Code = 27000, Error Code = 00002
this is due to the Foreignname , I specified with + symbol , which I though it as continuation character..
Job went fine...if I use the parameters as
3.172.334.56 (Exit = 04
dc_ftp
dc_ftp
ASCII
PUT 'G1NX62T.DATA.TEST1' +
/ap03/warehouse/cefrisk/data_files/invfin_ca/test.csv
QUIT
*******
In this case foreignname is small .. but usually in the remaining cases foreign name is 3,4 times larger than I specified... could u please guide me how to continue that foreignfile name..
Thanks
Anand |
|
Back to top |
|
|
Bill Dennis Advanced
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Thu Feb 20, 2003 12:04 pm Post subject: |
|
|
Is there a space between the ca/ and the plus? That may be inserting a blank in the name.
Bill |
|
Back to top |
|
|
Anand_R Intermediate
Joined: 24 Dec 2002 Posts: 189 Topics: 60
|
Posted: Thu Feb 20, 2003 12:47 pm Post subject: |
|
|
Bill,
Thanks for ur response..
there was a space..but I tried without space b/w ca & + symbol.. but it was treating test.csv as FTP command, it was not considering it as part of foreignfile name.. Here is the error..
Unknown command: 'test.csv'
thanks
Anand |
|
Back to top |
|
|
taltyman JCL Forum Moderator
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Thu Feb 20, 2003 2:34 pm Post subject: |
|
|
do one (or more) change directories so you can specify a relative filename instead of absolute.
3.172.334.56 (Exit = 04
dc_ftp
dc_ftp
ASCII
lcd /ap03/warehouse/cefrisk
lcd data_files
PUT 'G1NX62T.DATA.TEST1' invfin_ca/test.csv
QUIT |
|
Back to top |
|
|
Venkata Ramana Reddy Beginner
Joined: 02 Dec 2002 Posts: 70 Topics: 19 Location: California
|
Posted: Thu Feb 20, 2003 6:48 pm Post subject: |
|
|
Anand_R,
I had same problem.What we did is we kept the FTP parameters in a PS file(LRECL 120) and submitted the FTP job.It worked. _________________ Venkataramana
-- Good judgement comes from experience, and often experience comes from bad judgement. |
|
Back to top |
|
|
Anand_R Intermediate
Joined: 24 Dec 2002 Posts: 189 Topics: 60
|
Posted: Fri Feb 21, 2003 10:47 am Post subject: |
|
|
Hi Everyone
there is one other way to go.. I tried the CD(Change directory) option and it did work fine..
3.172.334.56 (Exit = 04
dc_ftp
dc_ftp
ASCII
CD '/ap03/warehouse/cefrisk/data_files/invfin_ca/'
PUT 'G1NX62T.DATA.TEST1' test.csv
QUIT
Reddy,
Cud u eleaborate me what exactly u did for continuation. I mean if foreignfile name exceeds 120 chars,, what u gonna do..
Thanks
Anand |
|
Back to top |
|
|
Venkata Ramana Reddy Beginner
Joined: 02 Dec 2002 Posts: 70 Topics: 19 Location: California
|
Posted: Fri Feb 21, 2003 4:40 pm Post subject: |
|
|
Anand_R,
This is what I have done.
Code: |
//FTP00001 EXEC PGM=IKJEFT01,DYNAMNBR=50
//OUT DD SYSOUT=*
//AMSDUMP DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSPRINT DD DUMMY
//OUTPUT DD SYSOUT=*
//INPUT DD DSN=MYFTP.INPUT.PARAMS,DISP=SHR
//SYSTSIN DD *
FTP (EXIT
/*
|
Contents of MYFTP.INPUT.PARAMS (LRECL=120)
Code: |
IP Address
Userid
password
pwd
ascii
cd /wwwmvsforumsdotcom/year2003/month02/day21/othertechtopics/ftpbeyond80chars
pwd
PUT 'AAAAAA.BBBB.CCCCCC.DDDDDD.EEEEEE' abcd_efgh_ijklc_dddd.txt
QUIT |
If could not fit the below line instream
cd /wwwmvsforumsdotcom/year2003/month02/day21/othertechtopics/ftpbeyond80chars
To overcome this problem I put all those parameters in the PS File MYFTP.INPUT.PARAMS and ran the job.
And it worked _________________ Venkataramana
-- Good judgement comes from experience, and often experience comes from bad judgement. |
|
Back to top |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Fri Feb 21, 2003 5:35 pm Post subject: |
|
|
Or you could just code it as follows:
cd /wwwmvsforumsdotcom/year2003/month02/day21
cd /othertechtopics/ftpbeyond80chars |
|
Back to top |
|
|
Venkata Ramana Reddy Beginner
Joined: 02 Dec 2002 Posts: 70 Topics: 19 Location: California
|
Posted: Fri Feb 21, 2003 8:07 pm Post subject: |
|
|
Bithead,
That is really really good & clever idea.That is why a love this forum.But what if you cann't fit the mainframe dataset name & the PC/unix file name in one line.
In the above example what if the PUT statement is something like this.
PUT 'AAAAAA.BBBB.CCCCCC.DDDDDD.EEEEEE' abcd_efgh_ijkl_mnop_qrst_uvwxyz_a111_b1111.txt.
Of course this situation may not arise for everyone,but I had this situation recently,where I could not fit both mainframe dataset name & the unix file name in one line.
I tried with all continuation symbols("+" , "-" etc) and at the end came up the above solution. _________________ Venkataramana
-- Good judgement comes from experience, and often experience comes from bad judgement. |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sat Feb 22, 2003 1:35 pm Post subject: |
|
|
You could ftp to a file and then use a RENAme to rename it to a longer file. The book says that + should work and I tried it and it does: Code: | //FTP EXEC PGM=FTP,COND=(4,LT),
// REGION=8M,PARM='my.ftp.server'
//NETRC DD *
//INPUT DD *
myuser mypassword
put 'geezer.clist(blab)' +
this.is.a.really.long.name.that.wont.fit.on.the.same.line.as.the.source
dir
dele +
this.is.a.really.long.name.that.wont.fit.on.the.same.line.as.the.source
dir
quit
//SYSOUT DD SYSOUT=T
//SYSPRINT DD SYSOUT=T
//OUTPUT DD SYSOUT=T,DCB=(RECFM=FB,LRECL=160,BLKSIZE=1600) |
|
|
Back to top |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Sun Feb 23, 2003 9:07 am Post subject: |
|
|
Or you could try:
LCD this.is.a.really.long.name.that.wont
LCD fit.on.the.same.line.as.the.source
LCD = Local System Change Directory.
Mainframe datasets are a maximum of 44 characters so there should be no problem. |
|
Back to top |
|
|
|
|