FTP VB file from tape to Unix - RDW is dropped



Post anything related to mainframes (IBM & UNISYS) if not fit in any of the above categories

FTP VB file from tape to Unix - RDW is dropped

Postby sinksort » Thu Nov 03, 2011 12:02 am

We have a problem FTP'ing VB files that are on tape - the RDW is being dropped. When the dataset is on disk, the RDW is preserved and there are no issues. Do you know what would cause this to happen? The FTP syntax is below...

//S030     EXEC PGM=FTP,PARM='(EXIT'
//INPUT    DD *
cd /test/file
SITE UMASK 022
BINARY
LOCSITE RDW
PUT //DD:TAPEDSN  test_file_from_tape.DAT
quit
/*
//TAPEDSN  DD  DSN=VARIABLE.BLOCK.FILE.ON.TAPE
//             DISP=SHR,
//             UNIT=TAPE
//OUTPUT   DD  SYSOUT=*,
//             AVGREC=K,
//             RECFM=FB,LRECL=160,BLKSIZE=160
//         INCLUDE MEMBER=SYSOUT
//*
sinksort
 
Posts: 5
Joined: Tue Oct 18, 2011 7:17 pm
Has thanked: 0 time
Been thanked: 0 time

Re: FTP VB file from tape to Unix - RDW is dropped

 

Re: FTP VB file from tape to Unix - RDW is dropped

Postby steve-myers » Thu Nov 03, 2011 12:27 am

For better or worse, FTP is operating as designed. Yhe RDW is not sent in a binary transfer.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: FTP VB file from tape to Unix - RDW is dropped

Postby steve-myers » Thu Nov 03, 2011 1:14 am

U was called away while writing my previous post. To continue:

A Unix file is just a stream of bytes. It has no attributes like record format and logical record length as is true of datasets in z/OS. There are no records as we understand them in OS/360 type datasets, so FTP just sends the stream of bytes in a binary transfer. An RDW in a RECFM=VB dataset is non-data control information so it is not sent. RECFM=FB datasets can be reconstructed in Unix because the records are fixed in length, but this is not true of RECFM=VB datasets. You can send RECFM=VB datasets to Unix as a text file because FTP will insert a newline character at the end of each logical record, and FTP will translate text data from EBCDIC to ASCII, but this translation is not always very consistent for non-text data, or for text data like the left and right square brackets that do not have a consistent EBCDIC definition.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: FTP VB file from tape to Unix - RDW is dropped

Postby Robert Sample » Thu Nov 03, 2011 6:08 am

When the dataset is on disk, the RDW is preserved and there are no issues.
If you are using the same FTP parameters, then the RDW would not be preserved. Binary FTP transfers of files with variable length files are going to lose the RDW (no matter if the source is tape or disk) as the RDW is not considered part of the record. Without doing some kind of special action, as far as I know it is not possible to successfully transfer using binary a file with variable length records to a Unix system and retain the record structure.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: FTP VB file from tape to Unix - RDW is dropped

Postby steve-myers » Thu Nov 03, 2011 9:35 am

Robert Sample wrote:... it is not possible to successfully transfer using binary a file with variable length records to a Unix system and retain the record structure.
The same is true of datasets with "undefined" records such as load module members.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: FTP VB file from tape to Unix - RDW is dropped

Postby prino » Fri Nov 04, 2011 3:08 pm

Gentlemen,

RDW can apparently be sent!

See File Transfer Protocol (FTP) - A List of FTP Commands
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 536
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 21 times

Re: FTP VB file from tape to Unix - RDW is dropped

Postby BillyBoyo » Fri Nov 04, 2011 3:37 pm

Good hunting, Prino.

Needs to be checked upon. Rest of the page seems to talk only of Unix and Windows. May have been pasted uncredited from elsewhere.

The BDW preceding the RDW on occasion is a little trip-up waiting to happen. Would need some work to handle.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: FTP VB file from tape to Unix - RDW is dropped

Postby MrSpock » Fri Nov 04, 2011 3:46 pm

prino wrote:Gentlemen,

RDW can apparently be sent!

See File Transfer Protocol (FTP) - A List of FTP Commands


IF mode is STREAM and transfer type is IMAGE (binary).
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: FTP VB file from tape to Unix - RDW is dropped

Postby prino » Fri Nov 04, 2011 4:41 pm

MrSpock wrote:
prino wrote:Gentlemen,

RDW can apparently be sent!

See File Transfer Protocol (FTP) - A List of FTP Commands


IF mode is STREAM and transfer type is IMAGE (binary).

Also for ASCII, but in this case you may not get what you want:

z/OS:
----+----1----+----2----+----3----
{Z-NL  +00 D   +00 DK  +00 S   +00

Windoze:
----v----1----v----2----v----3----v---
.↨..{Z-NL  +00 D   +00 DK  +00 S   +00
01007524422233242222332442223325222233
0700BADEC00B0004000B0004B00B0003000B00

And the 0017 is a EBCDIC-ASCII translation of x'26', aka 38. In other words, the RDW is sent, includes the length of itself, but it's also translated to ASCII...
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 536
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 21 times

Re: FTP VB file from tape to Unix - RDW is dropped

Postby BillyBoyo » Fri Nov 04, 2011 5:16 pm

Well, that is useful on a scale of zero to zero. Translate it back before using it...

I guess for the BDW it is not really a problem as I assume you get the whole block at once. Then convert it from ASCII....

However, it is always pointless doing both a BINARY transfer and a character-set translation, isn't it?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to All other Mainframe Topics

 


  • Related topics
    Replies
    Views
    Last post