But the location of the ODO length is application dependent. It might even be a calculated field in working storage. It isn't like there's a defined field type:
"Var-length field is binary fullword length followed by a stream of bytes where the length of the stream is the fullword length, not inclusive" So if an IMS segment contains variable length fields, you have to know how the application is defining them. Where's the length? How long is the length field? Does the length include the length of the length field? Or is the field terminated by some value (e.g. a null)? Is the starting position of the field variable? Does the length use a multiplier? Is the length 0 or 1 based? -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Binyamin Dissen Sent: Tuesday, May 21, 2024 10:23 AM To: [email protected] Subject: Re: How to convert these IMS unload files from EBCDIC to UTF-8 encoding. On Tue, 21 May 2024 15:01:12 +0000 "Schmitt, Michael" <[email protected]> wrote: :>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. Well, I don't know about that. 01 var-field-length pic s9(4) comp. 01 var-field. 05 var-field-character pic x occurs 1 to 1000 times depending on var-field-length. When a MOVE is performed to or from VAR-FIELD the length from VAR-FIELD-LENGTH is used. -- Binyamin Dissen <[email protected]> http://www.dissensoftware.com/ Director, Dissen Software, Bar & Grill - Israel ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
