IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FTP VSAM to Local System


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lseitelm

New User


Joined: 05 Mar 2009
Posts: 4
Location: Detroit

PostPosted: Fri Mar 06, 2009 2:11 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Mar 06, 2009 2:19 am
Reply with quote

I'm sorry, it's not clear. Where exactly are you going to perform the EBCDIC to ASCII conversion?
Back to top
View user's profile Send private message
lseitelm

New User


Joined: 05 Mar 2009
Posts: 4
Location: Detroit

PostPosted: Fri Mar 06, 2009 2:23 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 06, 2009 2:27 am
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Mar 06, 2009 2:31 am
Reply with quote

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
View user's profile Send private message
lseitelm

New User


Joined: 05 Mar 2009
Posts: 4
Location: Detroit

PostPosted: Fri Mar 06, 2009 2:31 am
Reply with quote

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
View user's profile Send private message
lseitelm

New User


Joined: 05 Mar 2009
Posts: 4
Location: Detroit

PostPosted: Fri Mar 06, 2009 2:33 am
Reply with quote

FTP will get caught up on the binary data if we don't transmit it using binary mode.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Mar 06, 2009 2:34 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 06, 2009 3:28 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
Search our Forums:

Back to Top