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



For Cycle driven programs (using level indicators), I use the following in /Free:
/Free
.
.
.  Do some stuff
.
/End-Free
CL0                            If                    *InLx
/Free
.
.
.
.  Do level break code here
.
 EndIf
  - Or - ( to make it pretty)
/End-Free
CL0                             EndIf



Jeff Young
Sr. Programmer Analyst
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2 
IBM  Certified Specialist- e(logo) server i5Series Technical Solutions Designer V5R3
IBM  Certified Specialist- e(logo)server i5Series Technical Solutions Implementer V5R3
  
 






________________________________
From: Jerry Adams <Jerry@xxxxxxxxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, January 8, 2009 4:15:45 PM
Subject: RE: Good places to use "The Cycle" in today's RPG was->Re: FW: Niftiest thing(s) you have done in RPG ILE or /FREE

Since most RPG programs do use the cycle (whether one knows it exists or not), /free can be used to write most of the calculations.  The only non-/free stuff is in the Total Calcs and those I usually code thus:

        /end-free
    CL3        EXSR        PROCES    (or CALLP a subprocedure; whatever)
      /free

The subroutine or subprocedure are then /free-format.  I've only got 2 or 3 programs with Input Primary (IP) files, but they are /free.

Jerry C. Adams
IBM System i Programmer/Analyst
B&W Wholesale
office: 615-995-7024
email:  jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rick baird
Sent: Thursday, January 08, 2009 3:01 PM
To: RPG programming on the IBM i / System i
Subject: Re: Good places to use "The Cycle" in today's RPG was->Re: FW: Niftiest thing(s) you have done in RPG ILE or /FREE

So do you just put a DO-ENDDO around ALL the logic? If so, never thought of
that before.

It's just an example.  I could do it, but I don't.  I've never needed
to do an unconditional goto in my code that couldn't be wrapped in
some sort of IF, DO, FOR, whatever.

Also, if your using level breaks doesn't that allow you to not use free
format?

I believe the cycle is not allowed in when using free.

I'm only asking because I don't know. Some of my issues with cycle maybe
just be I've never taken the time to learn it.

it's a common issue.  I don't really care if people decide never to
use it, but to criticize it just because they don't understand it is
lame. imo.

If you're using free exclusively, that's a pretty good excuse not to
use the cycle.

I can recall not too long ago I found a program what was using Ux
indicators. I had no idea what they were. I had to ask one of my co-workers
and they got a chuckle out of it.

yeah, the time before dinosaurs and entry parms.....  ;-)  Where I'm
at now, I'm fighting LDA every day.  that's the breaks!

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.