I'm trying to FTP a varaible length mainframe file to a server. I trying to figure out wht the correct commands are.
The client is pulling the file off the server with FTP on their mainframe. Instead of the indivudal records, its just a stream of data. So I've treid pulling it back, I get the same results. I'm baffled
The file I'm FTPing is BLK=29063 LR=29059 RECFM=VB, the commands I'm using are:
MODE S
TYPE I
PUT //DD:FTPIN01 TEST.BIN
QUIT
I've tried getting the file with:
TYPE I ;
LOCSITE BLK=29063 LR=29059
RECFM=VB ;
GET TEST.BIN //DD:FTPIN01 (REPLACE
QUIT
The FD is
//FTPIN01 DD DSN=TEST.DATA(+1),
// DISP=(NEW,CATLG,CATLG),UNIT=SYSDA,
// SPACE=(CYL,(100,100),RLSE),
// DCB=(MLDSCB,RECFM=VB,LRECL=29059,BLKSIZE=29063)
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
From the Communications Server User's Guide manual (I left out the actual syntax diagram):
Quote:
5.42 MOde subcommand--Set the data transfer mode
Purpose
Use the MOde subcommand to define how bits of data are to be transmitted.
Parameters
B
Sets the block mode. In block mode, data is transmitted as a series of data blocks, preceded by one or more header bytes. Block mode preserves the logical record boundaries of the data set or file. When MOde is set to B, the data transfer type must be EBCDIC.
Specifying MOde B is equivalent to specifying the BLock subcommand.
C
Sets the compressed mode. In compressed mode, data is transmitted as a series of data blocks, preceded by one or more header bytes. Compressed mode preserves the logical record boundaries of the data set or file. In compressed mode, data is transmitted without repetitive characters and blanks. When MOde is set to C, the data transfer type must be EBCDIC.
Note: Because additional processing time is required for both the sender and receiver to compress or decompress the data, evaluate the time factor before you compress a file.
Specifying MOde C is equivalent to specifying the COMpress subcommand.
S
Sets the stream mode. In stream mode, data is transmitted as a stream of bytes. Any data transfer type can be used with stream mode. Stream mode is efficient because data block information is not transferred.
Specifying MOde S is equivalent to specifying the STREam subcommand.
so what do you think happens to the record descriptor words and block descriptor words in your data file when you transfer the file as a data stream?
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Quote:
I'm trying to FTP a varaible length mainframe file to a server. I trying to figure out wht the correct commands are.
Something thing that comes to mind is to have a process on the target system that understands mainframe "stuff" and will receive the variable length file as a binary file and will de-block, convert char data to ascii, and handle binary and packed-decimal data properly. Where i've seen this done was on a migration from a mainframe to a hp-ux unix system and the vendor wrote the file manipulation code, not the application developers.