8 Replies Latest reply on Sep 23, 2021 6:02 AM by Bibek Sahoo

    Target as Mainframe File

    Yogesh Pathak New Member

      Hi All,

      I have source as .txt file with delimiters having  3 columns. First column is numeric and rest two are char types.

      In my Mainframe file data type for first column is NUM32 and rest 2 are char.

      When I am connecting columns from .txt to M/F file last two columns displayed correctly but for first column in M/F file special characters are coming.

       

      1. Do I need to convert first column to_decimal before connecting to target column of M/F.

      Though I tried to_decimal, to_integer still first columns not containing correct numeric values instead showing some special characters.

       

      Please help me what needs to be done to get it displayed correctly.

       

      Thanks

        • 1. Re: Target as Mainframe File
          Bibek Sahoo Active Member

          Hi,

           

          Are you using power Exchange to write into the target mainframe file?

          In the mainframe numeric data types can be interpreted in different ways depending on the PIC clause, If it is comp* type declared in the mainframe for the PIC clause, The data will not be in a readable format.

           

          If you use Power Exchange to write into mainframe target power exchange will take care of the conversion, If you are using direct DB2 connect/ODBC connect, I will let Power Center expert advice on that.

           

          Regards,

          Bibek

          • 2. Re: Target as Mainframe File
            Yogesh Pathak New Member

            Hi Bibek,

            Yes ,I am using power Exchange to write in to target M/F file.

            Data type for Column is NUM32 and its COMP Level 5 picture S9(9).

             

            Now when I am connecting from source (.txt file) to this column and when file getting created this column is not in readable format.

             

            Let me know where chnages needs to be done so that this column will be in readable format.

            • 3. Re: Target as Mainframe File
              Nico Heinze Guru

              The response by Bibek is correct, but it's only one part of the whole heap of possibilities what might go "wrong" here.

               

              First of all we need to know how you are trying to create that mainframe file.

              Is this a text file which is located on some network share accessible by that mainframe system?

              Are you requested to create a GDG or a sequential / VSAM / ... file?

              Or what?

               

              Please first explain what kind of file you have to create, where it is stored, and how you try to access it from PowerCenter. The mainframe world is so much different from Unix, Linux, and Windows that most methods you know from these worlds simply do not apply to mainframes.

               

              Regards,

              Nico

              • 4. Re: Target as Mainframe File
                Yogesh Pathak New Member

                HI Nico,

                we have requested to create GDG base for the file.

                File getting created at Mainframe end,and the structure for the target file imported from Power Exchange.

                • 5. Re: Target as Mainframe File
                  Bibek Sahoo Active Member

                  Hi Yogesh,

                   

                  COMP5 should not be in a readable format, It represents data in BINARY format. (https://www.ibm.com/docs/en/i/7.4?topic=clause-computational-5-comp-5-phrase-binary )

                   

                  Maybe if you could check with your mainframe team to see what is the actual value stored in that column, I believe it should show the correct data.

                   

                  Regards,

                  Bibek

                  • 6. Re: Target as Mainframe File
                    Yogesh Pathak New Member

                    HI Bibek,

                    I checked with M/F team and first column showing special characters rest two columns showing correctly.

                    • 7. Re: Target as Mainframe File
                      Nico Heinze Guru

                      If the first column is of data type NUM32, it should not contain any characters, it should be read as a NUM32 value. NUM32 values are not stored in characters but in binary format, if memory serves me right.

                      So the question is what value you're trying to write there and what value arrives in this field (in hex display). If you could post one or two examples, we might be able to verify whether the data are technically correct.

                       

                      Of course it might well be that the data ARE technically correct but that the application reading this GDG expects some character data in this field. Of course some binary coded number will not display as valid characters.
                      Could you please check that (or have that checked by those people receiving this file)?

                       

                      Regards,

                      Nico

                      • 8. Re: Target as Mainframe File
                        Bibek Sahoo Active Member

                        Hi Yogesh,

                         

                        As the second and third columns are in CHAR, It was in a readable format, and as the first field is defined as COMP5 that will not be in a readable format. But mainframe team should be able to tell you what value is present in that column.

                         

                        For testing purposes, you can write that data back to the txt file (source mainframe and target .txt file) and see if it shows the data correctly.

                         

                        Regards,

                        Bibek