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
 

 

FTP: MODE S causing corrupt data.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1475
Location: Chennai

PostPosted: Tue Apr 20, 2010 6:12 pm    Post subject: FTP: MODE S causing corrupt data.
Reply with quote

Hi,
I was performing FTP of a IDCAMS DCOLLECT file from one LPAR to another LPAR. But the number of records on o/p was more than i/p records.

Both i/p and o/p file had the below attributes.
Code:
Device type . . . . : 3390
Organization  . . . : PS   
Record format . . . : VB   
Record length . . . : 644 
Block size  . . . . : 27998

Used the below FTP cards to transfer the file,

Code:
//STEP1    EXEC PGM=FTP,REGION=2M,PARM='(EXIT TIMEOUT 900'             
//SYSFTPD  DD DISP=SHR,DSN=SOME DATASET         
//SYSTCPD  DD DISP=SHR,DSN=ANOTHER DATASET     
//SYSPRINT  DD SYSOUT=*                                               
//OUTPUT    DD  SYSOUT=*,DCB=(RECFM=FB,LRECL=644,BLKSIZE=27998)       
//INPUT     DD *                                                       
DEST IP ADDRESS                                                         
FTP USERNAME                                                               
FTP PASSWORD                                                               
TYPE E                                                                 
MODE S                                                                 
SITE RDW                                                               
SITE CONDDISP=DELETE                                                   
SITE CYLS PRIMARY=100 SECONDARY=25                                     
STATUS                                                                 
PUT 'SOURCE DCOLLECT FILE' +                           
    'DESTINATION DATASET'                               
QUIT                                                                   
/* 


FTP job gave RC of 0. But the number of records on o/p file was 550. (i/p records were 510).
Strangely was able to note that some of the records were spanning over two lines. Dont know why?

Changed MODE parameter from 'S' to 'B' (streaming - > blocked) and wahla the i/p and o/p rec count was same.

Can you please explain why MODE S causes some records to be spanned across two lines, whereas MODE B sends the records properly.

A sample DCOLLECT record that spanned over 2 lines is shown below in HEX ON mode,

Code:
.Ø..V ..XXX3..dY........XXXCM3U....ä..ϲ..Kâ..¢....,.                     
0800E400ECEF018E01100000EEECDFE00004017E00D4024200060                     
0000500123430A48101F00002823434000030C7A0D220AAC000B0                     
 -------------------------------------------------------------------------
%............«3390    ......                              ................
61000100130008FFFF44441000004444444444444444444444444444440000000000000000
C800020041003A33900000E100000000000000000000000000000000000000000000000000


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

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7997
Location: Bellevue, IA

PostPosted: Tue Apr 20, 2010 6:17 pm    Post subject:
Reply with quote

From the Communications Server User's Guide manual:
Quote:
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.
Notice stream mode does not say anything about preserving logical record boundaries, and it explicitly does not preserve blocking of the data.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1475
Location: Chennai

PostPosted: Tue Apr 20, 2010 6:26 pm    Post subject:
Reply with quote

Ya you are right, there is no reference to preserving logical record boundaries while transfer mode is S icon_eek.gif

So MODE S has a ***conditions apply*** attached with it.

Thanks,
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 -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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