Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code Indentation 1

Status
Not open for further replies.

jsplice

Programmer
Jun 3, 2003
88
US
I am not very pleased with the layout of traditional RPG code, and find it very hard to read in terms of loops. I understand that free-form code can be indented and is much easier to read, but 99% of the code that's in production was written in the traditional columnar layout. I heard there's a way to have the code printed with special lines outlining the loops, but have no clue how to do this. Does anyone know how?

Also, are there any other programs for entering RPG source code, for either the PC or on the AS/400? I've never seen anyone else here using anything but SEU, but I thought I'd look into it.
 
jsplice,

On the CRTRPGPGM command refer to the INDENT parameter. Insert the | (verticle pipe symbol) in this field and the compile listing will be indented based on the nesting of Do's, IF's, CASE's, etc.

As far as PC products, I assume you are on a recent version of OS/400. CODE/400 is a GREAT PC editor. You can have multiple windows open to the same souce member. An example.. one window can be filtered by a certain indicator, another can be indented (the indented windows is view only), another window can be opened to a subroutine, etc. etc.

Basically these are logical windows to the same source member. Full syntax checking and help available. You can change the font and colors, etc.

Best of all it is FREE. It is part of Webshere Developer Studio Client.

Here is an install for VisualAge RPG and Code/400 IBM

Image here CodeScreen

Also two good quick overviews here Code/400and Extra Code/400


Just do a quick search for Code/400


Let me know if you need more info.


[thumbsup2]



 
jsplice,

I agree with HitechUser, Code/400 is the way to go. But if you can't do that (we can't here, need more memory, politics, etc.) then look into RPG-Alive here: It's fairly cheap (or so I've been told) and it does a good job on both fixed and free format code. It works on the source code it's self so you don't need to compile.

HTH,
MdnghtPgmr
 


Here is another cheap (not in quality) alternative Code Studio

It is NO longer being updated, BUT it may work for you.

Hey just an idea.


 
For entering source code I always prefer the native SEU utility in AS400 because of the many formats that it provides in one instance of entry. I use it for RPGs, cobol, SQR, C++, VB and many more pgm languages. I am using reflection on my PC to emulate AS/400 and from there I can distribute the source into different platforms like unix, tandem, aix etc.
 
While I like CODE, IBM is no longer enhancing it. If you are looking for a better editor, try the LPEX editor included in WDSc (no charge if you bought any compiler). Edits all source types (RPG, COBOL, text, Java, html, xml, others), shows indents, converts RPG3 -> RPG4 -> freeform. Not perfect, but very good and includes nearly every feature in CODE. Oh, and automatically colors source code.
 
Thanks for all the input. Unfortunately, I don't have access to WDSc, so I can use neither CODE nor LPEX. I'll have to check out Code Studio and rpgalive.com to see what they offer. It looks like I may be stuck using SEU. The only reason I don't like SEU is because of the very low resolution of the AS/400 screen (80 columns). I don't really do enough coding yet to make it worth paying for another utility. I haven't looked into how these other utilities work (Code Studio and rpgalive) but from the screenshots it looks promising.
 
Well downloaded and installed RPGAlive. When I first used it, nothing was working so I looked at the trouble shooting section in the documentation. I viewed the help for WRQ Reflection (that's what I'm using). It said to apply a view setting of "A" to HLLAPI Short Name. I did this, and still get nothing. It says that you need version 7.0 or higher. I'm currently using version 9.0. Maybe this version of Reflection is too new for RPGAlive?
 
jsplice,

You should have an icon for RPGAlive in the lower right hand corner. Right click it and look over the settings. It could be disabled.

HTH,
MdnghtPgmr
 
I checked, and it is definitely enabled. I'll have to look through the documentation some more and see if there's any more troubleshooting advice.
 
jsplice,
You can get a 27x132 resolution screen if you're configuring Client Access PC5250 Display station with 27x132 emulation type and hit F13 when using SEU.
Just my 2 cts.
 
jsplice,

Is there a reason you are using WRQ Reflection and not Client Access? As Talkturkey has said, it's very easy to get a 27x132 session in Client Access and I KNOW RPGAlive works with Client Access. Client Access is free (I think, doesn't it come with OS/400?) and works very well. We use it here and it does a great job for us. I fire up five or six sessions every morning and leave 'em up all day. I use them all for different things throughout the day and have never had a problem. Just curious...

MdnghtPgmr
 
Alas Client/iSeries Access Display & Printer Emulator requires a license.
 


Here is another emulation option. Mocha. The download is fully fuctional and cost only $25 to purchase. Also they support many different platforms.

They have a browser based version (great) if you need to have a connection to your system over the Internet (of course you will need to secure your site).

Hey I thought this post was about code indentation. [poke]



 
>> Unfortunately, I don't have access to WDSc, so I can use neither CODE nor LPEX


Why not? If you have an iSeries with any compiler (e.g. RPG), you already have WDSc. You need to install it.
 
Yea I don't have Client Access installed here on my PC, so that's out of the question.

>> Why not? If you have an iSeries with any compiler (e.g. RPG), you already have WDSc. You need to install it.

I don't really have access to the company's software library. If it's already located somewhere on the system, then maybe I can grab it and install. Otherwise, that's not an option.

Thanks again though for all the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top