calling programs from IDE

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
leatherlips
Profound User
Posts: 83
Joined: Sun Oct 03, 2010 8:45 am
First Name: Mike
Last Name: Geldert
Company Name: Stonriver
Country: Angola
Contact:

calling programs from IDE

Post by leatherlips »

Is there a way to set the libl for programs called anonymously from the IDE? I'm wondering about when a programmer is creating a new program, then wants to run it to test it. I wouldn't want them to have to create a cl to set the libl each time. What is the suggested method ?
Thanks!
User avatar
Rob
Profound Logic Staff Member
Posts: 135
Joined: Fri Jan 04, 2008 12:12 pm
First Name: Rob
Last Name: Ferguson
Company Name: Profound Logic Software
Contact:

Re: calling programs from IDE

Post by Rob »

I would recommend writing a small "launcher" CL and RPG program. The developer would still anonymously call a CL program to first set the library list and then call the launcher RPG program. The RPG program would display a screen similar to that shown in the image attached below. The text box would be bound to field PROGRAM, a 10A field for the program name (or 21A if you want to qualify it with a library)

The RPG code below will allow the developer to enter any program name and press the Run button to call it.
RPG CODE
********
     H DFTACTGRP(*NO)

     FLAUNCHFM  CF   E             WorkStn Handler('PROFOUNDUI(HANDLER)')


     D* External program is defined by menu response field PROGRAM, from
     D* the DDS.
     D CallProgram     PR                  ExtPgm(PROGRAM)

      /Free

        DoW Not Exit;

          ExFmt MYFORMAT;
          If Not Exit;
            CallProgram();
          EndIf;

        EndDo;

        *InLr = *On;
        Return;

      /END-FREE
Attachments
Display file for Launcheer
Display file for Launcheer
Launch Dsp.png (2.64 KiB) Viewed 912 times
leatherlips
Profound User
Posts: 83
Joined: Sun Oct 03, 2010 8:45 am
First Name: Mike
Last Name: Geldert
Company Name: Stonriver
Country: Angola
Contact:

Re: calling programs from IDE

Post by leatherlips »

that'll work, thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest