ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

display all tables in IFS directory

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

  • #16
    Re: display all tables in IFS directory

    Thanks again.

    Comment


    • #17
      Re: display all tables in IFS directory

      Oh wise one. Can you do ftp statments inside Rpgle source? Can I connect to a ftp site login in, do a get ftp command? This is the scenario... I have to retrieve the ra.txt files from a remote ftp site. To do the get command I need to reference the name of the ra.txt file by its exact name. Well I won't know that name because it will have the first two letters as "RA" and the remaining 6 characters will be a timestamp. Any ideas? SPS commerce is the remote site. They suggested we do a ls ftp command to get the file names. Not sure how that will help.

      Comment


      • #18
        Re: display all tables in IFS directory

        Yes - but it i write more code you have to put me on the payroll

        there is code available on the site to demo this (index page)


        but basically you create a physical file in QTEMP called "something" then override it
        to INPUT....then strftp...

        PHP Code:
             C*
             
        COVRDBF FILE(INPUTTOFILE(*LIBL/SOMEFILE)
             
        C*
             
        C                   Eval      CmdString 'OVRDBF FILE(INPUT) '
             
        C                             +%Trim('TOFILE(CGI_BIN/BATCHFTPWP)') +
             
        C                             %trim('~OVRSCOPE(*JOB)')
             
        C                   eval      CmdString = %xlate('~' ' ' CmdString)
             
        C                   eval      CmdLength = %len(%trim(CmdString))
             
        C*
             
        C                   call      'QCMDEXC'                            99
             C                   parm                    CmdString
             C                   parm                    CmdLength
             C
        *
             
        CSTRTCPFTP 'ftp.code400.com'
             
        C*
             
        C                   Eval      CmdString 'FTP'
             
        C                             +%Trim('@@@')
             
        C                             +%Trim(Q)
             
        C                             +%Trim(Address)
             
        C                             +%Trim(Q)
             
        C                   Eval      CmdString = %xlate('@':' ':CmdString)
             
        C                   eval      CmdLength = %len(%trim(CmdString))
             
        C*
             
        C                   call      'QCMDEXC'
             
        C                   parm                    CmdString
             C                   parm                    CmdLength
             C
        *
             
        Cdltovr INPUT LVL(*JOB)
             
        C*
             
        C                   Eval      CmdString 'DLTOVR INPUT LVL(*JOB)'
             
        C                   eval      CmdLength = %len(%trim(CmdString))
             
        C*
             
        C                   call      'QCMDEXC'
             
        C                   parm                    CmdString
             C                   parm                    CmdLength
             C
        *
             
        C                   Endsr 
        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


        • #19
          Re: display all tables in IFS directory

          I know you've done a lot for me. I don't think my company could afford to pay you what you are worth. Sorry!

          Comment


          • #20
            Re: display all tables in IFS directory

            Okay - now thats gonna make someone write what they really think Im worth...just hope its not as400PRo (he's twisted)

            Let me know if you get the FTP working.............

            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


            • #21
              Re: display all tables in IFS directory

              No,

              Jamie does this because he is a kind and generous soul.

              He lives for the sense of accomplishment, the knowledge that he has helped his fellow man (or woman), the free beer, the gracious words from his fellow workers, the money in the swiss bank that he skims off the company and doesn't tell the goverment about, the kind words from management...

              What more can you say about a guy like that?

              Comment


              • #22
                Re: display all tables in IFS directory

                Thanks red look for the check in your mailbox.
                I cant remember did we say $50 a kind word or was it $75
                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


                • #23
                  Re: display all tables in IFS directory

                  Originally posted by jamief View Post
                  Okay - now thats gonna make someone write what they really think Im worth...just hope its not as400PRo (he's twisted)
                  isnt as400pro the hippest coolest strongest fastest programmer ever to be alive?

                  Comment


                  • #24
                    Re: display all tables in IFS directory

                    I was gonna write something about that the other day and forgot...
                    Im sure he did that just to stir things up...and when we all ignored it
                    I think it kind of hurt his feelings. Maybe we should all ask his forgiveness and try to work thru this......... whatcha think?
                    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


                    • #25
                      Re: display all tables in IFS directory

                      hey jamie, believe me ..i really do think as400pro is sorta the hippest despite his looks so i dont have to ask for his forgiveness..haha

                      (btw i know he is watching when i am typing)

                      Comment


                      • #26
                        Re: display all tables in IFS directory

                        bing - bing - bing! Ricochet Rabbit! ...

                        and who doubts my words! Bring it on Turtles!
                        I'm here to chew bubble gum and kick @#%@#%@#%.....and I'm all outta bubble gum !
                        Yes I'm talking to you squirrel nuts.

                        Comment

                        Working...
                        X