× 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.



Welcome to free-format Peter;

    Personal preference would be to paren around the conditions
for readability.
Also, the C in column 6 is not needed, even in
the /Free and /End-free lines - this will cause your error.

With that said, is Tcode defined elsewhere as an alpha field?
And I do hope you have an endif line.

So it would look more like this - assuming "A" is a numeric field.

  /Free

     IF (tcode = 'TA')  OR
        (tcode = 'ON')  OR
        (tcode = 'OF')        ;

          a = 123             ;

     endIF                    ;

  /end-free


This is easier to read (imho), and as you see,
you can "continue" the line of the IF statement -
this also makes more complex IF statements easier to read
and the same can be applied to select clauses, do loops,
for logic and so on.

HTH
Mark A. Manske



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Peter Vidal
Sent: Tuesday, July 01, 2003 8:22 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: IF Clause in /FREE format


Hi list:

In my sea of ignorance, thirsty of adventure, I have started to write some
code
using the /FREE format, now that we are on V5.2.  I have an IF statement as
follows:

C/Free
C         If Tcode = 'TA' or Tcode = 'ON' or Tcode = 'OF';
.
.
.
.
C/End-Free


... but this IF clause is in error:
Operation code is not valid; specification is ignored.

What's up doc?

TIA,
Peter Vidal
Pall Aeropower Corp.
SR Programmer Analyst
WWW.Pall.com / 727-539-8448, x2414

"A good player makes himself look good; a great player makes the team look
good."
Author unknown


_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.