ASCII file transfers

If you put data into a z/OS® UNIX file system file when the data type is ASCII, the file is tagged if you have used SBDATACONN to specify the code page for the file system and for the network transfer. That is, you have specified SBDATACONN=(file_system_cp,network_transfer_cp). If the data conversion table is the FTP_STANDARD_TABLES or is specified using XLATE, the file is not tagged. The following client session example shows the effects of combining data type ASCII and SBDATACONN defined tables using code pages:
. . . 
 1 (01) Command:  ascii                                                         
(02) >>> TYPE A                                                              
(03) 200 Representation type is Ascii NonPrint                               
 2 (04) Command:  site sbd=(ISO8859-1,ISO8859-1)                                
(05) >>> SITE sbd=(ISO8859-1,ISO8859-1)                                      
(06) 200 Site command was accepted                                           
 3 (07) Command:  put a afile                                                   
(08) >>> PORT 9,67,113,57,4,121                                              
(09) 200 Port request OK.                                                    
(10) >>> STOR afile                                                          
(11) 125 Storing data set /u/user33/tagging2/afile                           
(12) 250 Transfer completed successfully.                                    
(13) 200 bytes transferred in 0.070 seconds.  Transfer rate 2.86 Kbytes/sec. 
 4 (14) Command:  site sbd=(IBM-1047,ISO8859-1)                                 
(15) >>> SITE sbd=(IBM-1047,ISO8859-1)                                       
(16) 200 Site command was accepted                                           
 5 (17) Command:  put a efile                                                   
(18) >>> PORT 9,67,113,57,4,122                                              
(19) 200 Port request OK.                                                    
(20) >>> STOR efile                                                          
(21) 125 Storing data set /u/user33/tagging2/efile                           
(22) 250 Transfer completed successfully.                                    
(23) 200 bytes transferred in 0.005 seconds.  Transfer rate 40.00 Kbytes/sec.
 6 (24) Command:  site sbd=FTP_STANDARD_TABLES                                  
(25) >>> SITE sbd=FTP_STANDARD_TABLES                                        
(26) 200 Site command was accepted                                           
 7 (27) Command:  put a ufile                                                   
(28) >>> PORT 9,67,113,57,4,123                                              
(29) 200 Port request OK.                                                    
(30) >>> STOR ufile                                                          
(31) 125 Storing data set /u/user33/tagging2/ufile                           
(32) 250 Transfer completed successfully.                                    
(33) 200 bytes transferred in 0.005 seconds.  Transfer rate 40.00 Kbytes/sec.
 8 (34) Command:  ls -T                                                         
(35) >>> PORT 9,67,113,57,4,124                                              
(36) 200 Port request OK.                                                    
(37) >>> NLST -T                                                             
(38) 125 List started OK                                                     
 9 (39) t ISO8859-1   T=on  afile                                               
 10 (40) t IBM-1047    T=on  efile                                               
 11 (41) - untagged      T=off ufile                                                        
(42) 250 List completed successfully.                                                 
 12 (43) Command:  get afile                                                              
(44) >>> PORT 9,67,113,57,4,125                                                       
(45) 200 Port request OK.                                                             
(46) >>> RETR afile                                                                   
 13 (47) 125-Tagged ASCII file translated with current data connection translation table  
(48) 125 Sending data set /u/user33/tagging2/afile                                    
(49) 250 Transfer completed successfully.                                             
(50) 190 bytes transferred in 0.005 seconds.  Transfer rate 38.00 Kbytes/sec.         
(51) Command:  get efile                                                              
(52) >>> PORT 9,67,113,57,4,126                                                       
(53) 200 Port request OK.                                                             
(54) >>> RETR efile                                                                   
 13 (55) 125-Tagged EBCDIC file translated with current data connection translation table 
(56) 125 Sending data set /u/user33/tagging2/efile                                    
(57) 250 Transfer completed successfully.                                             
(58) 200 bytes transferred in 0.005 seconds.  Transfer rate 40.00 Kbytes/sec.         
(59) Command:  get ufile                                                              
(60) >>> PORT 9,67,113,57,4,127                                                       
(61) 200 Port request OK.                                                             
(62) >>> RETR ufile                                                                   
 14 (63) 125 Sending data set /u/user33/tagging2/ufile                                    
(64) 250 Transfer completed successfully.                                             
(65) 200 bytes transferred in 0.005 seconds.  Transfer rate 40.00 Kbytes/sec.         
 15 (66) Command:  site sbd=(IBM-1047,ISO8859-1)                                          
(67) >>> SITE sbd=(IBM-1047,ISO8859-1)                                                
(68) 200 Site command was accepted                                                    
(69) Command:  get afile                                                              
(70) >>> PORT 9,67,113,57,4,128                                                       
(71) 200 Port request OK.                                                             
(72) >>> RETR afile                                                                   
 16 (73) 125-Tagged ASCII file translated with table built using file system cp=ISO8859-1,
               network transfer cp=ISO8859-1                                                         
(74) 125 Sending data set /u/user33/tagging2/afile                                    
(75) 250 Transfer completed successfully.                                             
(76) 190 bytes transferred in 0.005 seconds.  Transfer rate 38.00 Kbytes/sec.         
(77) Command:  get efile                                                              
(78) >>> PORT 9,67,113,57,4,129                                                       
(79) 200 Port request OK.                                                             
(80) >>> RETR efile                                                                   
 17 (81) 125-Tagged EBCDIC file translated with table built using file system cp=IBM-1047,
               network transfer cp=ISO8859-1                                                         
(82) 125 Sending data set /u/user33/tagging2/efile                                    
(83) 250 Transfer completed successfully.                                             
(84) 200 bytes transferred in 0.005 seconds.  Transfer rate 40.00 Kbytes/sec.         
 18 (85) Command:  ebcdic                                                                
(86) >>> TYPE E                                                                      
(87) 200 Representation type is Ebcdic NonPrint                                      
(88) Command:  get afile                                                             
(89) >>> PORT 9,67,113,57,4,142                                                      
(90) 200 Port request OK.                                                            
(91) >>> RETR afile                                                                  
 19 (92) 557 File contains ASCII data - enter TYPE A command before entering RETR command
(93) Command:  get efile                                                             
(94) >>> PORT 9,67,113,57,4,143                                                      
(95) 200 Port request OK.                                                            
(96) >>> RETR efile                                                                  
 20 (97) 125 Sending data set /u/user33/tagging2/efile                                   
(98) 250 Transfer completed successfully.                                            
(99) 190 bytes transferred in 0.005 seconds.  Transfer rate 38.00 Kbytes/sec.             
Notes:
 1 
Change the data type to ASCII.
 2 
Site command requests a file system code page ISO8859-1, an ASCII code page.
 3 
Put a file and name it afile.
 4 
Site command requests a file system code page IBM®-1047, an EBCDIC code page.
 5 
Put a file and name it efile.
 6 
Site command requests standard FTP translation tables.
 7 
Put a file and name it ufile.
 8 
Use the ls subcommand to determine whether files in a UNIX System Services file system are tagged (that is, have a file tag). You use the -T option to request the file tagging information. When options are specified on the ls subcommand, name parameters cannot be specified.
 9 
afile is a tagged file. Its file system code page is IS08859-1. It is a Text file.
 10 
efile is a tagged file. Its file system code page is IBM-1047. It is a Text file.
 11 
ufile is an untagged file. It is not a Text file.
 12 
Retrieve afile, which is a tagged file.
 13 
Client receives an indication that the tagged file is translated using the current tables because the current data connection tables were not specified with a network transfer code page (see  6 ).
 14 
Since this is an untagged file, no indication is needed about the tables used.
 15 
Specify translation tables with a file system code page and a network transfer code page.
 16 
The code page of the tagged ASCII file is used with the network transfer code page to translate the data in the file.
 17 
The code page of the tagged EBCDIC file is used with the network transfer code page to translate the data in the file.
 18 
Change the data type to EBCDIC.
 19 
The 557 reply informs the client that the data type must be ASCII when the file that is tagged as ASCII is retrieved.
 20 
The EBCDIC file is OK to send with data type EBCDIC since no translation occurs and the data is already EBCDIC.