IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to set File Format to Binary


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Fri May 22, 2009 1:00 pm
Reply with quote

HI ,

I am FTPing a Dataset which do contain the data in Binary format .
But how can I set the file type to Binary .
Is there any specific command for this ?

I am Ftping to Tandem machines from mainframes .

Please can any one advice ??
Back to top
View user's profile Send private message
yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Fri May 22, 2009 1:41 pm
Reply with quote

Hi,

Just type 'binary' before receiving the dataset.

Thanks,
Yuge
Back to top
View user's profile Send private message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Fri May 22, 2009 2:40 pm
Reply with quote

Hi Yuge ,

Thank you . I have googled and I have got . Job has run fine .

Can you/someone please advise, which parameter we need to set to override the same DSN everytime we set .
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri May 22, 2009 2:53 pm
Reply with quote

Hello,

Before each transmission, change the dataset name as required. This can be done manually or you can have a front end process that re-creates the ftp control info before each execution.
Back to top
View user's profile Send private message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Fri May 22, 2009 3:14 pm
Reply with quote

Dick , Thanks for your information .

While doing work-around , I have got one more question ..


I need FTP 5 files of different LRECL . Can I do this in the one FTP job ?
At present I am defining parameters for a sinlge DSN .

Please advice
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri May 22, 2009 3:21 pm
Reply with quote

Sure -- each FTP GET and PUT command is treated separately. You may have to use QUOTE SITE commands to set parameters appropriately. I've even sent binary and text files in the same FTP session by switching back and forth between BINARY and TEXT commands in FTP.
Back to top
View user's profile Send private message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Fri May 22, 2009 3:31 pm
Reply with quote

Hi Robert , thanks for your response ..

Please can you clarify ...

I am using the below JCL :

//FTP EXEC PGM=FTP,REGION=4096K,
// PARM='IP ADDRESS (EXIT '
//SYSTCPD DD DSN=S.FTPLIB(TCPDATA),DISP=SHR
//SYSFTPD DD DSN=S.FTPLIB(FTPDATAP),DISP=SHR
//NETRC DD DSN=S.FTPLIB(USERID),DISP=SHR
//OUTPUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=S.FTPLIB(FTPTST),DISP=SHR


Where ,

TCP DATA for config information ,
USERID for the ID, passwords .

Have given I/O files in FTPTST and as below :
ASCII
BINARY
PUT INPUT FILE' 'OUTPUT FILE'
QUIT

Have given the respective LRECL , RECFM info in FTPDATAP .

But just confused if I given more than one DSN in FTPTST , how can I define the parameters ?

Please advice .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri May 22, 2009 3:50 pm
Reply with quote

Using your terminology and getting rid of the unnecessary ASCII command:
Code:
BINARY
PUT INPUT FILE' 'OUTPUT FILE'
PUT 'INPUT FILE 2' 'OUTPUT FILE 2'
PUT 'INPUT FILE 3' 'OUTPUT FILE 3'
PUT 'INPUT FILE 4' 'OUTPUT FILE 4'
PUT 'INPUT FILE 5' 'OUTPUT FILE 5'
QUIT
Back to top
View user's profile Send private message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Fri May 22, 2009 3:56 pm
Reply with quote

Hi Robert ,

I really apologise if I am asking the same quetion again .

My quetion here is :

Assume , Input file/file1/file2 are of different record lengths .
Do we need to specify them(different LRECL) explicitly ?
If Yes , how can we do it ...
If No , is FTP job by default allocates the Output file/file1/file2 .. and we do not need to define them ??

Please let me know .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri May 22, 2009 4:16 pm
Reply with quote

Question 1: do you see anywhere in the FTP PUT command to put the DCB characteristics such as record length?

Question 2-5: does Tandem need a record length? If so, how does their FTP server require the value to be specified? If not, why worry about it?

If you need to specify the record length, your code would be something like
Code:
BINARY
QUOTE SITE <Tandem record length specifier>
PUT INPUT FILE' 'OUTPUT FILE'
QUOTE SITE <Tandem record length specifier>
PUT 'INPUT FILE 2' 'OUTPUT FILE 2'
QUOTE SITE <Tandem record length specifier>
PUT 'INPUT FILE 3' 'OUTPUT FILE 3'
QUOTE SITE <Tandem record length specifier>
PUT 'INPUT FILE 4' 'OUTPUT FILE 4'
QUOTE SITE <Tandem record length specifier>
PUT 'INPUT FILE 5' 'OUTPUT FILE 5'
QUIT


The formal specification for FTP requires, I believe (I haven't had a chance to verify this in the RFC), the file on the server be created if it does not exist or be replaced if it does exist. I don't recall from the RFC what, if anything, is required to define the file but whatever is needed isn't much since FTP is a cross-platform standard that has to work on many, many different systems from different vendors.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top