ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

DspLnk Output *file

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

  • DspLnk Output *file

    Hi all

    i would need to put the result of DSPLNK in a file to read the Flr content (Subfolder and/or Stmf) ; is there another way instead of run DSPLNK *PRINT and then read the spool file ?

    here my scenario/problem:
    I have an IFS directory on which I have mounted a NAS device (MOUNT

    TYPE(*NFS) MFS('NAS:/nfs/ibmibckp') MNTOVRDIR('/ibmibckp') ; in V5R4

    and more recent when I use opendir + readdir etc , I works fine, if I

    use them in V5R3, readdir don't return anything . Which other Command

    can I use instead opendir + readdir to get files inside

    'NAS:/nfs/ibmibckp' ? Dsplnk *Print ? or which other that could

    work with V5R3M0

    Thanks in advance


  • #2
    Re: DspLnk Output *file

    I've never heard of a situation where DSPLNK works but opendir/readdir does not. (in fact, I thought DSPLNK called opendir/readdir under the covers to get the list it prints/displays.) Are you certain that DSPLNK works where opendir/readdir do not?

    It should not surprise anyone that V5R3 does not work perfectly with newer NAS, etc. V5R3 is from 2004, that's a long time ago! Things change in computers, newer versions of standards are always released, etc. You can't expect something from nearly 12 years ago to still work perfectly. Support for V5R3 ended in 2009, again, that's a very long time ago, nearly 7 years. At some point you have to say "we tried, but this is too old, we have to update and use newer versions".

    Comment


    • #3
      Re: DspLnk Output *file

      Hi Scott , thanks for your reply

      a question : which option i should use for listing the folder content in a file ? in the output file i would need of:

      obj name
      type Obj (*DIR/*STMF)
      date creation YYYYMMDD

      is it possible ?

      i tried with "QSH CMD('ls -lTo /tmp') "

      but :
      i don't see the type obj and the format date is "Nov 26 09:48:00 2015"

      Thanks in advance

      Comment


      • #4
        Re: DspLnk Output *file

        The outputs of both DSPLNK and QSH CMD('ls') are meant for people to read, not computer programs. I would not use these unless you have no other alternatives. Are you sure that opendir/readdir won't work? I can't understand why they would not work. (Aside from a bug in your programm that is...)

        If opendir/readdir will work, then you should call the stat() API for each object returned to get details.

        Comment


        • #5
          Re: DspLnk Output *file

          Hi Scott

          this morning i retryed and how have already written readdir don't work (opendir yes , it works)

          in the readdir, i receive the error 3006 (i used the program posted here http://www.mynewsgate.net/frameset.php?w=136 . Thanks to Obelix)

          i tried to to dsplnk *PRINT and it works .
          i tried to run QSH CMD('ls -lFTo /NASAS400') and it don't lists anything


          any idea ??
          pheraps i don't have some PTF for v5r3 ?

          Thanks

          Comment


          • #6
            Re: DspLnk Output *file

            A ptf for 5.3? yea its called 7.2 or 7.1 at least.
            Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

            Comment

            Working...
            X