Get the list of files on a AS/400 directory

25 pts.
Tags:
AS/400
CL programming
I have more than 6 files on a AS/400 directory. I want to get the list of the files on the directory and move them into a AS/400 library. Can this be done using CL programming?
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

Welcome
in IKET….. I have found a helpful article for you https://whatis.techtarget.com/reference/Common-AS-400-commands
I hope it will help you.

Thanks
& Regards

Clark
Kent

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • pdraebel
    You would need a list of the files. So a little QSHELL to get that done. Next process the list and use some form of CPY to get the IFS or QDOC files in a native iSeries format in a library.
    7,545 pointsBadges:
    report
  • Brijesh
    Listfile has to be created with the CRTPF command without a DDS, the length of the record depends on the maximum possible length of the filename in the IFS dir. QSH needs to be installed.
    14,450 pointsBadges:
    report
  • Narmadha6
    @pdraebel : Thank you very much. The below command worked for me.

    CHGVAR     VAR(&LSCMD) VALUE('LS ' *CAT &IFSpath *CAT '> /QSYS.LIB/'*TCAT &LIB *TCAT '.LIB/'*TCAT &FILE *TCAT '.FILE/'*TCAT &FILE *TCAT '.MBR')  
                                                             
    QSH        CMD(&LSCMD)                                   
                                     
    25 pointsBadges:
    report
  • Narmadha6
    @ Brijesh/Clark445kent : Thank you
    25 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: