View previous topic :: View next topic |
Author |
Message |
anaik Beginner
Joined: 31 Jan 2007 Posts: 20 Topics: 6
|
Posted: Thu Feb 01, 2007 10:16 am Post subject: FTP JCL ( Unix to Mainframe) |
|
|
Hi
I want to FTP a file from Unix box to Host side. The file is of variable size length. i use the below JCL
Code: |
//STEPFTP EXEC PGM=FTP,PARM='/(EXIT',REGION=7000K
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
server name
user password
Binary
site lrecl=32756 recfm=vb blksize=32760
cd /clrcmpdwnload/afp/hold
get Unix file 'host file'
quit
/*
//
|
but the file that gets created on the host has blksize=6233 and lrecl=252
I needed help so that i can modify or use some other utitlity to ftp JCL |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Feb 01, 2007 10:46 am Post subject: |
|
|
I'd create the job thus
Code: |
//STEPFTP EXEC PGM=FTP,PARM='/(EXIT',REGION=7000K
//SYSUT1 DD DSN=<host file>,RECFM=VB,LRECL=32756,BLKSIZE=32760,...
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
server name
user password
Binary
cd /clrcmpdwnload/afp/hold
get Unix file //dd:sysut1
quit
/*
//
|
or
Code: |
//STEPFTP EXEC PGM=FTP,PARM='/(EXIT',REGION=7000K
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
server name
user password
Binary
locsite lrecl=32756 recfm=vb blksize=32760
cd /clrcmpdwnload/afp/hold
get Unix file 'host file'
quit
/*
//
|
or, I'd use the SYSFTPD DD (FTP.DATA) to provide the default values for recfm, lrecl, and blksize |
|
Back to top |
|
 |
anaik Beginner
Joined: 31 Jan 2007 Posts: 20 Topics: 6
|
Posted: Thu Feb 01, 2007 11:29 am Post subject: |
|
|
thanks superk |
|
Back to top |
|
 |
anaik Beginner
Joined: 31 Jan 2007 Posts: 20 Topics: 6
|
Posted: Thu Feb 01, 2007 11:55 am Post subject: |
|
|
I have another problem..
The file which i am trying to FTP from Unix to Host is having a problem with structure.
Original file
=======
!..Ly |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Feb 01, 2007 12:18 pm Post subject: |
|
|
Since you're receving the file in binary mode to a rather large dataset, I'm not sure what you expect it to look like. If you could post both files as they appear in hexadecimal, I think you'd see that there's really no difference content-wise. |
|
Back to top |
|
 |
anaik Beginner
Joined: 31 Jan 2007 Posts: 20 Topics: 6
|
Posted: Sat Feb 10, 2007 12:28 pm Post subject: |
|
|
The original variable file the contents are as below
LINE1
LINE2
LINE3
the variable file which is created after FTPing on the host is
LINE1LINE2LINE3
does it help in understnading my query |
|
Back to top |
|
 |
anaik Beginner
Joined: 31 Jan 2007 Posts: 20 Topics: 6
|
Posted: Mon Feb 12, 2007 10:49 am Post subject: |
|
|
any help guys |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Mon Feb 12, 2007 11:44 am Post subject: |
|
|
anaik,
you are missing CRLF in the input file. Create the file with CRLF and then FTP the dataset.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Mon Feb 12, 2007 12:55 pm Post subject: |
|
|
That still will not do it, as far as I know. The reason is that binary transfers do not respect crlf (or actually, Unix only uses one of those, cr or lf, I forget which one), since there is no such thing in the MVS file system. Maybe if you FTP the file to the Unix side of MVS and then use cp or OCOPY to move the file to the MVS file system you will get what you want, but even then I'm not sure. |
|
Back to top |
|
 |
prasanth_thavva Beginner

Joined: 14 May 2006 Posts: 40 Topics: 18
|
Posted: Fri Feb 16, 2007 2:57 am Post subject: |
|
|
HI,
Can any body explain in details each step in This JCL.
Code:
//STEPFTP EXEC PGM=FTP,PARM='/(EXIT',REGION=7000K
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
server name
user password
Binary
locsite lrecl=32756 recfm=vb blksize=32760
cd /clrcmpdwnload/afp/hold
get Unix file 'host file'
quit
/*
//
Thanks&Regards
Venkata Prasanth Thavva _________________ Thanks&Regards
Prasanth Thavva |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Feb 16, 2007 4:42 am Post subject: |
|
|
If you have line input then it is not a binary file, surely? so should not be sent as a binary file _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
|
|