ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Bulk File Translate O.o Field by Field

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

  • Bulk File Translate O.o Field by Field

    hi

    I am trying to translate about 100 files to ASCII format and save in a PF.
    All the file name saved in a parameter table, but how can I retrieve all the variable names of each file in the parameter table?
    I dun want to enter all the variable names in the Parameter table...

    Please help X 10000

  • #2
    Re: Bulk File Translate O.o Field by Field

    Sorry I'm not following you... are these files on the IFS?
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Bulk File Translate O.o Field by Field

      are you asking for how to enter the variable names for the ASCII files or the PF?
      I'm not anti-social, I just don't like people -Tommy Holden

      Comment


      • #4
        Re: Bulk File Translate O.o Field by Field

        No Sorry I am not making clear..
        It's like I need to get all the variable names of each file and put it a loop and translate to ASCII 1 by 1.

        thanks very quick reply

        Comment


        • #5
          Re: Bulk File Translate O.o Field by Field

          but I have done the ASCII part, just wonder on how to obtain all the name of variables and pass it to the loop.

          Comment


          • #6
            Re: Bulk File Translate O.o Field by Field

            Hi peacealidi:
            By Variable name do you mean field name?

            GLS
            The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

            Comment


            • #7
              Re: Bulk File Translate O.o Field by Field

              yes its like

              PHYSICAL FILE1: FILE1
              PHYSICAL FILE2: FILE2
              PHYSICAL FILE3: FILE3


              When the file name pass into RPG program, I want the RPG get all the variable name of each file.
              then

              Do until last variable of FILE1
              VariableX
              Convert to ASCII
              Write to NEW Physical File
              Enddo

              Comment


              • #8
                Re: Bulk File Translate O.o Field by Field

                DSPFFD to an output file for each PF??? or use SQL to query SYSCOLUMNS???
                I'm not anti-social, I just don't like people -Tommy Holden

                Comment


                • #9
                  Re: Bulk File Translate O.o Field by Field

                  i have about 100 files and each file got 80 variables.
                  So I really can't create a file with all variables in there...

                  Comment


                  • #10
                    Re: Bulk File Translate O.o Field by Field

                    Im still lost, but I am slow!

                    here is an example of a program that when passed a file name lists all the fields with attributes.
                    It is not in free as it is as old as the hills,
                    http://www.code400.com/ffd.php


                    Jamie
                    All my answers were extracted from the "Big Dummy's Guide to the As400"
                    and I take no responsibility for any of them.

                    www.code400.com

                    Comment


                    • #11
                      Re: Bulk File Translate O.o Field by Field

                      Can you please tell us why you do want to create ASCII PFs ? Is it to exploit those on a Windows platform ?
                      Philippe

                      Comment


                      • #12
                        Re: Bulk File Translate O.o Field by Field

                        WOW Philippe you really know how to spoil a party.

                        It's been 2 hours since your comment ...... I think you scared peacealida away

                        GLS
                        The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

                        Comment


                        • #13
                          Re: Bulk File Translate O.o Field by Field

                          hi

                          thanks for helping, because the existing design is like this....
                          so I can't modify the design
                          Yes we need to export interface to ORACLE platform, so I have to convert it to ASCII..

                          Thanks so much

                          Comment


                          • #14
                            Re: Bulk File Translate O.o Field by Field

                            You do know the IFS is in ASCII.. why not just create the tables there and export to ORACLE from there?
                            Anyway, please let me know if the code I posted is of any help.

                            Thanks
                            Jamie
                            All my answers were extracted from the "Big Dummy's Guide to the As400"
                            and I take no responsibility for any of them.

                            www.code400.com

                            Comment


                            • #15
                              Re: Bulk File Translate O.o Field by Field

                              Why wouldnt you just perform SQL calls from the system that Oracle is running on to the i?
                              Last edited by MichaelCatalani; July 7, 2011, 05:32 PM.
                              Michael Catalani
                              IS Director, eCommerce & Web Development
                              Acceptance Insurance Corporation
                              www.AcceptanceInsurance.com
                              www.ProvatoSys.com

                              Comment

                              Working...
                              X