Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to set File Format to Binary

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: How to set File Format to Binary
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    Post subject: Reply to: How to set File Format to Binary
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    Post subject: How to set File Format to Binary
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

Site Director


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

PostPosted: Fri May 22, 2009 2:53 pm    Post subject:
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    Post subject:
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: 7999
Location: Bellevue, IA

PostPosted: Fri May 22, 2009 3:21 pm    Post subject:
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    Post subject:
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: 7999
Location: Bellevue, IA

PostPosted: Fri May 22, 2009 3:50 pm    Post subject:
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    Post subject:
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: 7999
Location: Bellevue, IA

PostPosted: Fri May 22, 2009 4:16 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us