Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


VSAM to PC download

VSAM to PC download

VSAM to PC download

Does anyone know if any of the PC COBOL software packages allows for downloading VSAM files with Comp-3 fields and then using them as is?


RE: VSAM to PC download

I may be missing something, but it seems that if you want to move some fields as is, you could define them  as COMPUTATIONAL fields to the software that does the moving.  Unless the numbers are translated from big-endian to little-endian (I hope that's the right direction) in the move, the bits should come out the other end unchanged.  Then just tell the recieving process that they really are PACKED-DECIMAL.

RE: VSAM to PC download

There are expensive commercial tools that do this.  Another approach is to write a simple conversion program.  Create a second layout similar to the original that doesn't have any COMP or COMP-3 data.  If its structure is identical, you can use MOVE CORRESPONDING from the original layout to the revised layout.  This will give you a layout that is entirely character data.  When you download it, it should be converted from EBCDIC to ASCII.  Finally, you can run a similar program on the PC to convert the numeric data back into the packed format.  This probably won't handle signed numbers correctly.  You could process those by including the "SIGN IS LEADING SEPARATE" clause to cause the sign to be stored in a separate character.  

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close