On Sat, 2 Feb 2008 13:29:01 -0600, Mark Zelden <[EMAIL PROTECTED]> wrote:

>On Fri, 1 Feb 2008 18:59:47 -0600, Paul Gilmartin <[EMAIL PROTECTED]>
>wrote:
>
>>On Fri, 1 Feb 2008 10:13:53 -0600, Mark Zelden wrote:
>>>
>>>A coworker of mine was looking for basically the same thing you want to
>>>do.. but MVS to zip file.   Instead of using OCOPY to get the data set in
>>>an HFS prior to zip, I showed him how we can NFS mount the MVS data
>>>set and use JAR directly ...
>>>
>>Please show me, too!  Does this work for TEXT files?  I can't
>>get it right.  If I use xlat(Y), the data appear in ASCII;
>>if I use xlat(N), the records are strung out with no
>>linefeeds.  What options did you use?  Is there an EBCDIC-to-
>>EBCDIC translation table defined?
>>
>
>The translation is sort of confusing using the NFS client and server on
>z/OS.  For EBCDIC data you do need to use xlat(n).   PARM xlat(n) prevents
>double translation from the server and  client.  So this will actually
translate
>the data to ASCII.  See the fine manual (NFS).
>
>My co-worker pointed out the same issue you are seeing with the
>records.  I told him to open them in word and the data was formatted
>the way he expected - so there must be some indication there.   I've seen
>the same issues using FTP.  I assume this could be "fixed" by using tr (unix
>translate) or other method.  I haven't actually looked at the data in hex to
>see what is really there.
>

The problem is Windows / DOS uses CR+LF and Unix just uses LF (newline)
(as does MAC from what I read).   So if your FTP is to another Unix
platform, you will be fine.   Unix uses 0x0A and windows / dos use
0x0D 0x0A.  "tr" can't do that so you need a script (sed?)... search google
for "unix2dos"  

Anyway... here are some 2 examples.  The first one using NFS and the
second one having to OCOPY the data to a Unix file system first:

//MYJOB JOB (acct),CLASS=A,...                                    
//*                                                               
//* In this example hlq.MYFILE is mounted via NFS at the          
//* nfs1 dir.      The NFS mount is done using PARM xlat(n) which 
//* prevents double translation from the server and client.       
//* This will translate the EBCDIC data to ASCII with z/OS        
//* NFS client + z/OS NFS Server.  See the fine manual (NFS).     
//*                                                               
/*                                                                
//JAR      EXEC PGM=IKJEFT01                                      
//SYSTSPRT DD SYSOUT=*                                            
//SYSEXEC  DD DSN=SYS1.SBPXEXEC,DISP=SHR                          
//SYSTSIN  DD *                                                   
 oshell                        +                                  
   cd /u/userid/nfs1;          +                                  
   jar cvfM test.zip MYFILE                                       
/*                                                                
//FTP   EXEC PGM=FTP,REGION=2048K,PARM='(EXIT'                    
//SYSPRINT DD SYSOUT=*                                            
//OUTPUT   DD SYSOUT=*                                            
//INPUT    DD *                                                   
10.1.1.20                                                         
userid                                                            
password                                                          
bin                                                               
put /u/userid/test.zip +                                          
   /temp/test.zip                                                 
quit                                                              
/*                                                                



//MYJOB JOB (acct),CLASS=A,...                                 
//*                                                            
//OCOPY   EXEC PGM=IKJEFT1B                                    
//IN       DD  DISP=SHR,DSN=userid.MYFILE                      
//OUT      DD  PATH='/u/userid/myfile.txt',                    
//             PATHOPTS=(OCREAT,OTRUNC,OWRONLY),PATHMODE=SIRWXU
//SYSTSPRT DD SYSOUT=*                                         
//SYSTSIN  DD  *                                               
  OCOPY INDD(IN) OUTDD(OUT) CONVERT((BPXFX311)) FROA0317       
/*                                                             
//JAR      EXEC PGM=IKJEFT01                                   
//SYSTSPRT DD SYSOUT=*                                         
//SYSEXEC  DD DSN=SYS1.SBPXEXEC,DISP=SHR                       
//SYSTSIN  DD *                                                
 oshell                +                                       
   cd /u/userid/;      +                                       
   jar cvfM test.zip myfile.txt                                
/*                                                             
//FTP   EXEC PGM=FTP,REGION=2048K,PARM='(EXIT'                 
//SYSPRINT DD SYSOUT=*                                         
//OUTPUT   DD SYSOUT=*                                         
//INPUT    DD *                                                
10.1.1.20                                                      
userid                                                         
password                                                       
bin                                                            
put /u/userid/test.zip +                                       
   /temp/test.zip                                              
quit                                                           
/*                                                             



--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to