View previous topic :: View next topic
|
Author |
Message |
lseitelm
New User
Joined: 05 Mar 2009 Posts: 4 Location: Detroit
|
|
|
|
dick scherrer wrote: |
Hello,
If you run an IDCAMS/Repro you can create a sequential file that will easily download.
If your vsam file contains packed decimal or binary data you will need to reformat your sequential file to edited zoned decimal. If you are downloading it to a pc or unix you may also need to create a "delimited" file for use on the target platform.
An easy to do this is to write a program that reads the vsam file and creates the output in a downloadable format. The program is bacically a vsam read, some moves (one for each field), and a write to a qsam output file. |
Hi, I have a flat file that I am trying to read on my Windows PC. The file was FTP from the mainframe and was created by IDCAMS REPRO. I understand the file is in EBCDIC but in order to convert it to ASCII I need either a record length or an end of record delimiter. This seems to be variable length records with no record delimiter.
Can anyone help me with this? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm sorry, it's not clear. Where exactly are you going to perform the EBCDIC to ASCII conversion? |
|
Back to top |
|
|
lseitelm
New User
Joined: 05 Mar 2009 Posts: 4 Location: Detroit
|
|
|
|
I am using an editor called VEDIT, I have used this before to do EBCDIC to ASCII conversion. The tool converts the codes OK, but can't figure out where to break records. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Unless you have some very specialized software in place on the pc, you will want to take the output from the REPRO and create a new file suitable for downloading. This would be a file with only "text" fields - no packed-decimal or binary. The output from REPRO is not delimited and it may contain these "unusable" data formats.
The ftp will handle the ebcdic/ascii conversion automatically (if you let it). |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
I use FTP to transfer files from the mainframe to my PC all the time, as long as you don't specify BINARY, FTP does the EBCDIC to ASCII conversion automatically along with adding an CR/LF at the end of each record. |
|
Back to top |
|
|
lseitelm
New User
Joined: 05 Mar 2009 Posts: 4 Location: Detroit
|
|
|
|
FTP will send binary data (which the file does contain). I am not worried about converting binary data (binary in EBCDIC is the same as BINARY in ASCII). I have the file on my PC now, I do not have access to the mainframe to change the way the file is created or to change the way it is FTP'ed to me.
VEDIT will suppport conversion of either fixed length or variable length records, but if it is variable then I have to tell it the record delimiter. |
|
Back to top |
|
|
lseitelm
New User
Joined: 05 Mar 2009 Posts: 4 Location: Detroit
|
|
|
|
FTP will get caught up on the binary data if we don't transmit it using binary mode. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
When you FTP the data, make sure that you specify the RDW option for the SITE subcommand:
5.64 SIte subcommand--Send site-specific information to a host:
ftp>quote "site rdw"
200 SITE command was accepted
ftp>get .....
Quote: |
Specifies that Record Descriptor Words (RDWs) are treated as if they were part of the record and are not discarded during FTP transmission of variable format data sets in stream mode.
|
Presumably, your tool will know how to read the RDW values in front of each record, which can be used to calculate the length of each record. Otherwise, the only other option I see is for you to intentionally add a common delimiter value to the end of each record, something that your tool will know how to process. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I do not have access to the mainframe to change the way the file is created or to change the way it is FTP'ed to me. |
Even if difficult, might it still be possible?
How large is the file? What were the attributes of the mainframe file from which it was REPROed/downloaded? |
|
Back to top |
|
|
|