RPG and Service Programs

85 pts.
Tags:
AS/400
MVC pattern
OS/400
Service program
V5R4
I'm getting into the "MVC pattern" experience of RPG programming, thanks to Scott Klement's hints (see "A pattern for reusable code" on his site http://www.scottklement.com and "Binder Language and the Signature Debate" at http://systeminetwork.com/print/64029). After some initial difficulties, I have made an application based on a collection of procedures in a service program (SP) and some controlling programs that use these services. The good thing is that every connection with files and video interface is completely managed in the SP, without any duplication of code. The bad thing is that for every little change in the SP, after compiling and updating it, I must sign off and then again sign on in order to keep on testing. Unfortunately, AS400 keeps the old copy of the SP in memory and all the stuff works as though I've never made any change. Any suggestions? Thanks

Software/Hardware used:
OS400 and RPG V5R4

Answer Wiki

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

Ok. I’ve found by myself the command that “drops” the group under test: RCLACTGRP.
In a nutshell: I must first compile the starting program under a “test” group, e.g. ACTGRP(‘MYTEST’). The Service Program routines use the group of the caller.
Then, when I’ve done my test and corrected the errors, I must compile and update the Service Program and issue the command RCLACTGRP ACTGRP(‘MYTEST’) wich cleans everything related with “Mytest” and makes the new version to come up at the next test run.
Thanks again for the hint.

Discuss This Question: 9  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
  • BigKat
    I use multiple group jobs in my session. One to code/compile, another to test. After I make a test, I drop that group job. After recompiling, I start a new testing group job
    7,935 pointsBadges:
    report
  • Paolo51
    That's exactly what I was looking for: a way to clean up the working space. Ok, but what is the command to "drop" the testing group? Thak you.
    85 pointsBadges:
    report
  • TomLiotta
    You can probably imagine the potential problems if replacing a program actually replaced programs that were in use. By keeping processes active within activation groups, you can update programs while production users are active. By running RCLACTGRP, your application can choose when to bring new versions into active jobs. You can collect multiple related programs into the same named activation group, or you can separate them into as many activation groups as you need. You can use the activation group *NEW if you want a program to start its own temporary activation group that will automatically disappear as soon as the program ends. You can use the activation group *CALLER when you want your program to run in the activation group of whatever program called yours (even if that one was *NEW or the 'default' activation group). They're a little confusing at first. They're really handy when you see what they can be used for. Tom
    125,585 pointsBadges:
    report
  • Paolo51
    Thanks for the clear frame of reference you added to the subject, Tom. I admit I've always avoided working with activation group. I simply did not understand his potential use in the activity of maintainig software.
    85 pointsBadges:
    report
  • TomLiotta
    I have an activation group that I use to store temporary data elements in. These data might be generated early in the job and be needed at any time later. It's unpredictable when a data request module might be called; but as long as the activation group isn't reclaimed, the data items are available and generally invisible. No need to store in a temp object in QTEMP, which might be seen and displayed, not to mention possibly changed. No need to pass parms through an unknown series of program calls. Set it and forget it, until needed. If not needed, it goes away just like QTEMP. Not a perfect solution for many things, but it works well for the right problems. Until you use features, you never know when they might be the right answer. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    ...what is the command to “drop” the testing group? For BigKat's suggestion, review the CHGGRPA, TFRGRPJOB and ENDGRPJOB commands. They've kind of faded from use since PCs with multiple emulator session windows have taken over everything, but group jobs can supply some really nice effects. (TFRSECJOB can also be handy, combined with group jobs or not.) Tom
    125,585 pointsBadges:
    report
  • BigKat
    I still use group jobs because on some of the systems I work on, we aren't allowed to sign-on to multiple sessions
    7,935 pointsBadges:
    report
  • BigKat
    BTW: group jobs are different than activation groups. Group jobs are "kinda" like opening multiple virtual sessions, but all through one sign-on session. Whichever group job is active runs, and the rest wait on you to trasfer back and do something there. You can't switch while a process is running, so if you key a command that is going to run (interactively) for 20 minutes you can't switch over to do something else, but it is great to be able to pull up a screen in one job and when you need to lookup something to enter a second one without losing your place in the first
    7,935 pointsBadges:
    report
  • MurrayInfoSys
    All - I use "Group" jobs all the time for testing. Especially for testing RPGSQL programs. When I ENDGRPJOB, It removes ALL the activation group jobs within that job. Almost like SIGNOFF Phil
    940 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