× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: What are signatures?
  • From: Jim Langston <jlangston@xxxxxxxxxxxxxxxx>
  • Date: Tue, 20 Mar 2001 08:12:55 -0800
  • Organization: Pacer International

When you create a service program, you can have the service program generate
a "signature".  This signature is a hex string that is generated off the
list of procedures in the service program.

When you compile an RPG program and have it link to this service program, the
RPG program will grab a copy of the signature.  Now, every time you run the
RPG program it will compare the signature it grabbed with the signature of the
service program.  If these strings do not match, RPG will complain and not run.

So why would the signature change?  Because you changed the service program.
You added/changed/removed modules.  If the RPG program didn't check the 
signature,
it would try to use the service program anyway, and would be calling the 
procedures
wrong, and would make for bugs.

Now, perhaps you are just adding routines to your service program, and don't 
want to recompile all the RPG programs that use it.  When you create the service
program, you add an entry for *PRV (Previous) for a PGMLVL, so that the service 
program will now contain more than one signature, both being valid, and your
RPG program will work as you want it to.

If you remove a procedure, or change the name, however, you are not going to 
be able to get a signature with the same value, which is a good thing, and will
have to recompile your RPG program, which you are going to have to do anyway.

Which brings up another point.  Why have more than one service program?  It's
fairly obvious from this that if you had all your procedures in one service 
program and made changes, your signature would keep changing, and all your
RPG programs would have to be recompiled.  Not a happy thought if you have many
RPg programs that use the service program.  Breaking the procedures into many
service programs, though, you would only have to recompile the programs that
used the calls in the service programs that were changed, a far less number.

Service Program Signatures work almost the exact same way as physical file
level indicators, with the notable exception you can have more than one
signature per service program, but only one file level indicator per file.

Regards,

Jim Langston

"Smith, Mike" wrote:
> 
> Can someone provide a easy to understand description of SIGNATURES.  I don't
> quit understand why i should use them.  Thanks.
> 
> -----Original Message-----
> From: Stone, Brad V (TC) [mailto:bvstone@taylorcorp.com]
> Sent: Friday, March 09, 2001 8:22 AM
> To: 'RPG400-L@midrange.com'
> Subject: RE: E-mail notification from AS400
> 
> > > Why not Java?
> >
> > Java is slow.   Furthermore, I find object oriented code to be a bit
> > awkward, and a pain to debug.   This could be because I've been
> > programming too long -- but apparently others agree with me, since
> > I've yet to see a complete application written in Java.
> >
> > If I wanted a cross-platform language, I think I'd pick Perl.
> >
> > Can I turn the question back at you?   Why would you use Java?
> 
> Would would I?  Hmmm...  now you're going to make me think.  It is slow, and
> that was always one of my excuses, but it is getting better, I have to
> admit.  I also am having problems getting back into OO after years of RPG.
> But, it's slowly coming.  And, it's fun.
> 
> But, a full scale application in Java?  Right now that scares me.  I've been
> writing little ones and if you want to do OO correctly you end up with so
> much "stuff" that you're right, debugging would be heck.  At least with ILE
> we have signatures.  With Java you change an object (a big no no, but it
> will happen) and who knows what will happen.
> 
> So, I guess I would use it only so I could work outside of the AS/400 world,
> should I choose that route.  (But I doubt I will).
> 
> >
> >
> > Do you do programming on your Win9x PCs?   Have you ever made
> > a mistake
> > and passed parms incorrectly to a Windows API?   Crash.
> > Have you ever
> > accidentally overwritten memory on a Windows machine?  Crash.
> 
> Oh, I thought were were talking about using the OS, not programming with
> them.  <bg>.  I see your point.
> 
> >
> > I can't say I've had a problem like that on Linux.   I guess
> > I don't use
> > Linux that much, since I prefer FreeBSD.
> 
> It was versions of Redhat and Mandrake 7.1.  Man, what a bummer.  But, it
> seems to be fixed now.  Been running for a couple weeks and the logs show no
> sign of looping... yet..
> >
> > Brad, lest there be hard feelings, let me say that I've read
> > some of your
> > work over the years, and I have a lot of respect for you.
> > I've enjoyed
> > many of your messages on these lists.
> >
> > Please don't take my disagreement on many of these points as a lack of
> > respect for your opinion.
> 
> Hard feelings?  Never.  You'd have to do a lot more (like kidnap my wife).
> I love it when people chat.  Sometimes the only reason I post what I do is
> to get people talking.  I respect people more for speaking their mind
> because when it all comes to it, it's really just opinion and no one is
> right or wrong.  Unless it's about using the cycle in which it should always
> be used for level breaks.  ;)
> 
> Brad
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.