ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

find the correct pgm

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

  • find the correct pgm

    hi
    my client wants me add some new options in the screen.how to find the program for that screen?also the same program in different libraries.how do find the correct program which the screen refers?

  • #2
    Re: find the correct pgm

    dspobjd Mylib/Myscreen *file

    and option 8 to see the source file
    Patrick

    Comment


    • #3
      Re: find the correct pgm

      Append following line of code in you Programe

      Code:
      D MyPSDS         SDS               
      D  PgmName                1     10 
      D  PgmStatus             11     15 
      D  JobName              244    253 
      D  UserID               254    263
      then you can move the value in display file

      Pramendra Pandeya
      Young people knows how to run fast but old people knows the way..

      Comment


      • #4
        Re: find the correct pgm

        Yes as Pramendra wrote .... create a 10 *char field on all display files then use the above sds
        and place the program name on the displays.
        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


        • #5
          Re: find the correct pgm

          I exhumed this CL out from my personal archives, it'll prob fit your needs.

          Code:
          pgm &parmnam
           dcl &parmnam *char 10
          
           dcl &prvlib *char 10
           dcl &prvnam *char 10
           dcl &count *dec (3 0) 0
           dcl &counta *char 3
          
           dclf QADSPPGM
          
           dsppgmref  *USRLIBL/*ALL objtype(*PGM *SRVPGM) +
                        output(*OUTFILE) outfile(QTEMP/QADSPPGM)
           ovrdbf QADSPPGM qtemp/QADSPPGM ovrscope(*job)
          
          loop: rcvf
           monmsg cpf0864 *n goto end
            if ( &whobjt = 'F' *and &whfnam = &parmnam ) do
             if ( &prvlib = &whlib *and &prvnam = &whpnam ) goto loop
              sndpgmmsg ( 'File ' *cat &whlnam *tcat '/' *cat &whfnam +
                           *tcat ' declared in program ' +
                           *cat &whlib *tcat '/' *cat &whpnam *tcat '.' )
              chgvar &count (&count +1)
              chgvar &prvlib &whlib
              chgvar &prvnam &whpnam
           enddo
           goto loop
          
          end:
           dltovr QADSPPGM lvl(*job)
           chgvar &counta &count
           sndpgmmsg ( &counta *cat ' program(s) found.' )
          endpgm
          Submit this program above using the name of your display file as input parameter, but beware make it run preferably at night since this is a long running program.

          EG.

          Code:
          SBMJOB CMD(CALL PGM(MyLib/CLPGM) PARM('[I]MYDSPF[/I]'))
                   JOB(...)                                   
                   SCDDATE(*THU)                                   
                   SCDTIME(0100)
          Philippe

          Comment


          • #6
            Re: find the correct pgm

            For a non-programmatic solution, use shift + esc followed by option 3 (then enter) and then follow the leads.
            â??No bird soars too high if he soars with his own wingsâ?? â?? William Blake

            Comment


            • #7
              Re: find the correct pgm



              Philippe,

              My God man you know how I feel about CL -- did you have to go and add reading files to it?
              I think I just vomitted in my own mouth..
              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


              • #8
                Re: find the correct pgm

                Jamie,
                I posted this coz it was what I thought the OP wanted from his requirement. Or maybe I did not clearly grasp the meaning of what he meant.
                However I do not really get why you're wanting to kill me, so what's wrong with you with CL ? Do you think it inappropriate here ?
                Philippe

                Comment


                • #9
                  Re: find the correct pgm

                  I love your work.... Just dont like CL...
                  I think I once wrote
                  CL is for Small children and farm animals
                  Cool Icon -- you must agree
                  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


                  • #10
                    Re: find the correct pgm

                    Okay. Grant you can have your own opinion. Those new icons are very nice, yes indeed !
                    Philippe

                    Comment


                    • #11
                      Re: find the correct pgm

                      Originally posted by jamief View Post
                      I love your work.... Just dont like CL...
                      I think I once wrote
                      Originally posted by jamieflovesclle
                      CL is for Small children and farm animals
                      And here I was thinking you liked CL cos your profile lists your occpation as fence painter and Master of CLLE
                      Greg Craill: "Life's hard - Get a helmet !!"

                      Comment

                      Working...
                      X