Arrgh, meant to type that unload from image copy restores to a DATASPACE, i.e. in memory. But my point is it requires an IMS system.
-----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Schmitt, Michael Sent: Tuesday, May 21, 2024 10:01 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How to convert these IMS unload files from EBCDIC to UTF-8 encoding. Some others have answered your questions, but here's my $0.02 USD: 1. You should convert all the numeric fields to edited text. Otherwise, unless you're using a COBOL system on Linux, you'll have trouble with the field formats. Think packed decimal, implicit signs, little/big endian, etc. 2. When a segment has multiple layouts, usually the application has some field in the segment that it can use to know which layout to use. But it is *possible* that it uses different layouts based on *other* segment's data. It could be in the same database record (a "record" is a root and all its children). Or a different record. Or even in a different database. 3. Depends on the language. IMS can have variable length segments but not variable length fields, so any variable length fields are defined by the application. If the application is in COBOL, there's no native variable length field format. Applications can simulate variable length fields but how they do it is in application logic. 4. You have several problems in reading unconverted files on Linux: A. Unloads in are in mainframe variable length record format. Unix doesn't have a similar format; files in Unix are just a stream of bytes. How are you going to read the file? (you probably should convert to a text file with LF to separate the records -- but you can't do this BEFORE converting it, because the file's binary data can contain LF characters) B. Need to be able to interpret the unload file format. It is possible (the format is documented) but it is non-trivial. C. Text fields and zoned decimal are in EBCDIC. Your program to read the file would need to convert to ASCII. D. Records in an unload do not contain concatenated keys. E. The format for HALDB databases is different than non-HALDB. F. I don't know how to interpret the data in an image copy at all. I'm not aware of pre-built tools for reading unload files on other than z/OS, so you may need to write your own utilities. 5. An unload file contains the segment data (the logical data the application obtains when it reads the segment), the segment name, and some other data. There's little meta data. For example, you can't use an unload file to load a database without a DBD. The unload is in hierarchical order, but if the database is HDAM or PHDAM then the roots are in random order. The native IMS tools can't create an unload from an image copy. The extra-cost High Performance IMS tools from IBM may be able to do it. But if so, then I bet it would work like the Broadcom tool: it creates the unload from the image copy by restoring the database (from the image copy) to a database, then unloading it. That means you must have an IMS system to run it on. -----Original Message----- From: Jason Cai <ibmm...@foxmail.com> Sent: Tuesday, May 21, 2024 4:08 AM To: IBM-MAIN@LISTSERV.UA.EDU; Schmitt, Michael <michael.schm...@dxc.com> Cc: Jason Cai <ibmm...@foxmail.com> Subject: How to convert these IMS unload files from EBCDIC to UTF-8 encoding. Dear Michael and all Thank you very much for your response and the valuable information provided. Over the past few days, I discussed the DBD definitions with our IMS DBA, and we have a similar setup where “The only fields that are required to be defined in a DBD are the keys, indexed fields, and any other fields that the application wants to be able to reference in Segment Search Arguments (SSAs). In the IMS system I work on, 99% of the segment fields are not defined in the DBD.” We are considering moving away from the mainframe, and our historical data is preserved on tape in IMS unload format and IMS IC. Initially, we wanted to convert the IMS database to a DB2 and then into a MySQL database to facilitate the migration of backup data from the mainframe to linux. Now, we are only planning to transcode the IMS unload files to make them readable on the Linux platform. We have all the necessary copybooks and are currently looking to convert these IMS unload files from EBCDIC to UTF-8 encoding. Here are a few questions regarding the conversion process: 1.For fields in the copybook defined as PIC A, PIC X, and PIC 9, these require conversion, but for numeric fields like PIC 9(4) COMP-1, no conversion is needed, correct? 2 How do we handle the conversion if the database has multiple copybooks? 3 What is the process for converting variable-length fields? 4 If we choose not to convert anything, are there any tools available on Linux that can read these IMS unload files in EBCDIC encoding? 5.Does the IMS unload file include information about segments, and how are they encoded? Furthermore, we do not have access to Broadcom IMS tools or File Manager. Could you please inform me if IBM has any utilities that can create the unload format file from an image copy input? Any advice or suggestions you can provide would be greatly appreciated. Best regards, ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN