Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1521
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: 8154
Location: East Dubuque, Illinois, USA

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: 1521
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 Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Iterative use of a REXX script causin... bryonyh CLIST & REXX 4 Fri Jul 28, 2017 12:52 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us