View previous topic :: View next topic
|
Author |
Message |
spoorni
New User
Joined: 29 Nov 2007 Posts: 20 Location: india
|
|
|
|
Hi,
I am trying to NDM a VSAM file with a variable block to a unix server. Once I NDM the file, the NDM process is successful but when i try to read the file on the UNIX server, i am unable to do that and my script fails. Is it possible to NDM a VSAM variable block file to UNIX? If yes, would the length of the file be the same as that of the VSAM file or do I need to copy it to a flat file with a length of file as length plus 4 bytes?
Anyone face the same issue? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Is it possible to NDM a VSAM variable block file to UNIX? |
Yes - you are doing it! A much more interesting and informative question -- Is the resulting file going to be usable on the Unix server? Probably not. VSAM has control information embedded that is binary data and when the VSAM data set is transferred, the control information will be converted to ASCII and hence lose every bit of meaning it had. If, on the other hand, you do NOT convert to ASCII then you're stuck with an EBCDIC file on the Unix Server which won't be very readable either. I suspect NDM with VSAM data sets is designed to go z/OS to z/OS and not z/OS to Unix -- so the VSAM control data is most likely being transferred with the application data. Hence unless you're pretty good at translating hex (that went through an ASCII conversion process) RBA data into something Unix recognizes, the transferred file is most likely useless.
Why don't you do the normal thing and unload the VSAM data set into a sequential variable length data set (with no binary or packed decimal fields) and NDM the sequential data set to the Unix server? This is what you should be doing. Because even if you get the VSAM data set on a Unix server with valid control data, Unix servers do not deal with VSAM data sets and hence you've got an unusable file on the Unix server, and there's no way that I am aware of to make it usable. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hello Robert,
Just curious, if we send a variable block file to unix server, would unix server be able to interpret the RDW properly?
Or does NDM does the RDW interpretation and sends a fixed block record to unix? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
If NDM is doing EBCDIC to ASCII translation, I would expect the RDW to be removed and a LF (since the data is going to a Unix machine and not a Windows machine) added to the end of the record (which is what FTP does for a text transfer). If NDM is doing a binary transmission then the RDW will (usually) be transferred as part of the record and Unix won't know what to do with it since it's 4 bytes of hexadecimal stuck on the front of each record (and another 4 bytes stuck to the front of each block). And without the line terminators Unix won't know where one record ends and the next begins so it'll treat the entire data set as a single record.
I don't know a whole lot about NDM since it's been a number of years since I used CONNECT:DIRECT, but I don't recall any option to convert a variable length record into a fixed length (but NDM may have that capability now). |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Vasanth - I know nothing about NDM, but ...
No data mover I know of sends RDW data in a "binary" data transmission, though I believe recent versions of IBM FTP have an option to send RDW data. The traditional rule is control data (e.g., RDW data) is not sent in "binary" data.
In any event, VSAM data records do not have RDW type data. Length data for records in VSAM data sets is external to the data. Programs that read VSAM data sets normally retrieve record length data from the RPL. A VSAM RPL is a data area that contains the address of the data area where VSAM is to move the data to, as well as the length of the data area and the length of the data moved to the data area.
In any event, this may not be an issue. The TS claims the data set has fixed length records. If the receiving system cannot deblock this data it is a failure of the program on the receiving system, not a failure on the part of the data mover. Of course, the TS may be lying, or at best, his information is incorrect.
The TS did not bother to tell us if the data was sent as "binary" data or "text" data. Data movers insert *nix "new line" characters after each logical record when the data is sent as text data. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Thank you Robert and Steve for your thoughts.
Regards, |
|
Back to top |
|
|
|