View Full Version : Reading a file from CD-ROM
T.Holt
01-01-1995, 02:00 AM
A client of mine has a new 170, which has a CD-ROM drive, of course. One of their suppliers has sent them a CD in EBCDIC. The CD has one file. I can see the file name, creation date, etc. by using the DSPOPT command. (Or at least, I think that's the command I used.) What I can't figure out is how to read the data off the CD. I have a piece of paper that tells record length, where the fields start & end, etc. Does anybody know how I can make an RPG program directly read the CD, or how I can copy the CD into a disk file so I can read it? Many TIA.
Guest.Visitor
01-07-1999, 07:12 AM
Ted, The CD-ROM can be accessed as a file system under the Integrated File System. See the OS/400 Optical Support manual (online) and expect to refer to the System API Reference under Integrated File System APIs. There may be other ways, but this is the one I'm familiar with.
Guest.Visitor
01-07-1999, 08:53 AM
On Wednesday, January 06, 1999, 09:27 PM, Ted Holt wrote: A client of mine has a new 170, which has a CD-ROM drive, of course. One of their suppliers has sent them a CD in EBCDIC. The CD has one file. I can see the file name, creation date, etc. by using the DSPOPT command. (Or at least, I think that's the command I used.) What I can't figure out is how to read the data off the CD. I have a piece of paper that tells record length, where the fields start & end, etc. Does anybody know how I can make an RPG program directly read the CD, or how I can copy the CD into a disk file so I can read it? Many TIA. Ted, You should be able to see the file using the WRKLNK command. It should be in the QOPT directory. If that is the case, and you are on V4R1 or later, you should be able to determine the path and use the CPYFRMIMPF command to retrieve the data to a native AS/400 file. This command is available via PTF for V4R1/V4R2 and is included with V4R3. The documentation is in the V4R3 manuals. The piece of paper you have can be used to create a file definition file to describe the conversion. David Morris
T.Holt
01-07-1999, 02:43 PM
Bruce & David: Thanks for your suggestions. Both ideas sound correct & doable. I'll try to remember to let everybody know what happens.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.