Find string in AS/400 library

350 pts.
Tags:
AS/400
AS/400 Library
String
my requirement is find out string and which file contain that string,file name,file type,source file name this information find

Software/Hardware used:
software

Answer Wiki

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

Can you please give us some clarification.
Do you need to scan the data in a PF Data file to find a character string?
Or is it a PF-SRC file where you need to scan the source members to find something..
If that is the case then you can use WRKMBRPDM.
Put ’25′ in the option field by the first member and then do F13 to repeat that option for all members. A screen will appear where you can enter the string value you are looking to find.
*
Are you looking to find a string either in a file name or the text description of a file or member. If so, you can also use PDM for that by using F15 to get a subset list.

Discuss This Question: 5  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
  • madhuchowdary
    thanks, but my requirement is find out all source files(qddssrc,qrpglesrc,qclsrc),particular file name,that object type.please give example cl or rpg
    350 pointsBadges:
    report
  • WoodEngineer
    This IBM command may do what you want. Just run it over all the source files you need to check. There are lots of choices for the OPTION parm. I just used *PRT as an illustration. FNDSTRPDM STRING(FILENAME) FILE(QRPGLESRC) MBR(*ALL) OPTION(*PRT)
    6,500 pointsBadges:
    report
  • CharlieBrowne
    Here is some code for my FNDSRC command. It searches all Q* files on the system for a member and then uses WRKMBRPDM to display all of them. You can easily modify this to get what you need. *
    CMD        PROMPT('FIND A SOURCE FILE MEMBER')           
                                                             
    PARM       KWD(MBR) TYPE(*CHAR) LEN(10) PROMPT('Source + 
                 Member')                                    
    
    +++
    PGM        PARM(&NAME)                                    
                                                              
    DCLF       FILE(DSPOBJD)                                  
    DCL        VAR(&NAME) TYPE(*CHAR) LEN(10)                 
    DCL        VAR(&TEXT) TYPE(*CHAR) LEN(50)                 
    DCL        VAR(&CHG ) TYPE(*CHAR) LEN(13)                 
    DCL        VAR(&USE ) TYPE(*CHAR) LEN(07)                 
                                                              
    DCL        VAR(&SLICE) TYPE(*DEC)  LEN(07 0)              
    DCL        VAR(&Purge) TYPE(*CHAR) LEN(10)                
    DCL        VAR(&Pool ) TYPE(*CHAR) LEN(10)                
    DCL        VAR(&SWS  ) TYPE(*CHAR) LEN(08)                
                                                              
    RTVJOBA    TIMESLICE(&SLICE) PURGE(&PURGE) TSEPOOL(&POOL) 
    CHGJOB     TIMESLICE(9999999) PURGE(*NO) TSEPOOL(*NONE)   
                                                              
        DSPOBJD    OBJ(*ALL/Q*) OBJTYPE(*FILE) +              
                   OUTPUT(*OUTFILE) OUTFILE(QTEMP/DSPOBJD)    
                                                              
    DLTF       FILE(QTEMP/&NAME)      
                MONMSG     CPF0000                                         
                CRTSRCPF   FILE(QTEMP/&NAME) RCDLEN(112)                   
                                                                           
                OVRDBF     FILE(DSPOBJD) TOFILE(QTEMP/DSPOBJD)             
    LOOP:       RCVF                                                       
                MONMSG     MSGID(CPF0864) EXEC(GOTO CMDLBL(PDM))           
                                                                           
                If         Cond(&OdObAt = 'PF') Then(Do)                   
                RTVMBRD    FILE(&ODLBNM/&ODOBNM) MBR(&NAME)                
                MONMSG     MSGID(CPF9815 CPF9812 CPF2864 CPF9822) +        
                             EXEC(GOTO CMDLBL(LOOP))                       
                                                                           
                CPYF       FROMFILE(&ODLBNM/&ODOBNM) TOFILE(QTEMP/&NAME) + 
                             FROMMBR(&NAME) TOMBR(&ODLBNM) +               
                             MBROPT(*ADD) CRTFILE(*YES) FMTOPT(*NOCHK)     
                EndDo                                                      
                GOTO       CMDLBL(LOOP)                                    
                                                                           
    PDM:                                                                   
                DLTOVR     DSPOBJD                                         
    CHGJOB     TIMESLICE(&SLICE) PURGE(&PURGE) TSEPOOL(&POOL)  
    ENDPGM
    41,380 pointsBadges:
    report
  • HMSSL2K
    You should post you work here or what you have tried to do. This sounds like a homework question. I'm only saying this because you don't say what you tried to do before asking us for help.
    3,175 pointsBadges:
    report
  • madhuchowdary
    [...] 5. CharlieBrowne gave some pointers on when to use the D Spec on DS in AS/400. 6. WoodEngineer and CharlieBrowne gave some code suggestions for finding a string in AS/400 library. [...]
    0 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