Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Help with converting Mainframe file on iSeries

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with converting Mainframe file on iSeries

    Beware Mainframe flat files are often initialized to spaces. After conversion using *NOCHK your packed fields may have a value of hex X'404040'. This will not become apparant until an application is run, and you receive an MCH decimal data error. This is because there is no sign on the field. You could check the entire file for this condition, or recompile your programs not to check for decimal errors. Dave

  • #2
    Help with converting Mainframe file on iSeries

    Thanks for your reply David. I don't think this will be an issue as I don't need to do anything on the 400 with it apart from get it off in a CSV format, so there won't be any programs using the file (other than the one to updated the field I'm having the problem with to zeros)

    Comment


    • #3
      Help with converting Mainframe file on iSeries

      The following web page may be of help to you. http://www.discinterchange.com/tech_talk_.html in particular, scroll down the left hand side under COBOL particularly with COBOL computational fields and COBOL comp-3 packed fields Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@NBTY.com

      Comment


      • #4
        Help with converting Mainframe file on iSeries

        Thanks for the replies, to solve the first problem I've defined the field as 8B instead of 7P, which has worked!

        Comment


        • #5
          Help with converting Mainframe file on iSeries

          Neil, How did you shut off the error: "CWBDB0052 - Error occurred during data conversion". One of my users gets this as well, even though the file transfers ok. I would just as soon she not see the error. ---Dale

          Comment


          • #6
            Help with converting Mainframe file on iSeries

            Hi there, I'm looking for some advice/help on a file that I'm having some trouble with. The file originates from a mainframe, and is sent over to our iSeries (V5R2M0) via Connectirect. The file is 3680 Bytes long, comprising of string and compressed numeric data. I have the layout of the file, although it's in a notation I'm not familiar with, Cobol I think it is, which gives me the start and end position of all the fields, and what type they are. My aim is to get this file from the 400 to a PC, with all the fields, in a CSV format, on a monthly basis as it's received. This solution is an interim one, probably lasting for a few months, no longer than a year. What I've done is set up a physical file, defining all 300 or so fields in the file. I then copy the file received in the Connectirect library into my own file using the CPYF command with a *NOCHK option. This works fine, all the records are copied, but when I query the file 1 of the fields is unreadable and I get the message "Column B9012 contains replacement character +". This field is defined in the layout file I have as: 211 09 PRRS-S1C-EDITION-NUMBER PIC S9(08) COMP. This means that the field starts at position 211 in the file. The next field starts at position 215, so I've defined my field in the physical file as: A B9012 7P 0 TEXT('S1C-EDITION-NUMBER') All the other compressed numeric fields have the notation COMP-3., whereas this one is only COMP. - I'm not sure what the difference is there. It would seem that the field is a compressed or packed numeric field, of 8, but for it to start at 211 and end at 215 I have to define it as 7 in the physical file. Do you have an idea of what I can do here? At the moment, seeing this field is not essential, after the copy file command I'm just running through the file and setting the value to 0. The next question I have is around Client Access. When I run Query, there are no errors shown in the file. However, when I try to use the "Receive File From Host" facility in Client Access, I get the error "CWBDB0052 - Error occurred during data conversion", but all records transfer successfully. I can't figure out which fields are in error, although from reading on the internet it would appear there may be null values that are causing this. I've switched off the option to display warnings during data transfer, which stops the message occurring. Would there be a problem I'm masking by doing this?

            Comment


            • #7
              Help with converting Mainframe file on iSeries

              There is an option within the file transfer program, not to display error messages. Click on the "properties" icon. Dave

              Comment

              Working...
              X