AS/400: Create a CL program using DSPOBJD

Tags:
AS/400
CL Program
PGM
Regarding AS/400, I need to create CL program using DSPOBJD to find the PGM starts with any alphabets as our wish.

Answer Wiki

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

The DSPOBJD command allows you do do that. Just put an * as the last character.
You can either just display the results or you can go to an OUTFILE, and then continue with any process you want with that data.

Discuss This Question: 2  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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Splat
    If non-display output is not required, the WRKOBJ command can be useful.
    7,445 pointsBadges:
    report
  • ToddN2000

    In your CLP program you dump your data to a file in say QTEMP like this

    DSPOBJD OBJ(TRNLIB/*ALL) OBJTYPE(*PGM) OUTPUT(*OUTFILE) OUTFILE(QTEMP/MYPGMS)       

    Then read the records in this file and substring the object name field ODOBNM for the desired letter(s).    

    You can take this further by having a prompt screen for the LIBRARY name and the LETTER TO SEARCH. That way you code once and it works for all scenarios.

                                                             

    13,050 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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following