Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

FTP VSAM to Local System

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: FTP VSAM to Local System
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

Moderator Team Head


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

PostPosted: Fri Mar 06, 2009 2:19 am    Post subject: Reply to: How Can I FTP A VSAM File to Local Drive..???
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    Post subject: Reply to: FTP VSAM to Local System
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

Site Director


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

PostPosted: Fri Mar 06, 2009 2:27 am    Post subject:
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    Post subject:
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    Post subject: Reply to: FTP VSAM to Local System
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    Post subject: Reply to: FTP VSAM to Local System
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

Moderator Team Head


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

PostPosted: Fri Mar 06, 2009 2:34 am    Post subject: Reply to: FTP VSAM to Local System
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

Site Director


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

PostPosted: Fri Mar 06, 2009 3:28 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us