View Full Version : No LR indicator in interactive pgm
01-01-1995, 02:00 AM
I am doing some work for a shop that has a lot of S/36 code. I am working on some RPG II programs that use combined primary files. (Yuck!) Anyway, none of them has a C spec to set on the LR indicator. Also, there is no O spec with an "R" in column 16 to release the workstn. What makes the LR indicator come on in such programs?
05-24-2000, 01:15 AM
In the RPG Cycle LR is set to *ON when an EOF condition is reached on the Primary File.
05-24-2000, 03:36 AM
Normal Cycle output that does not have anything conditioned to output will end the program. In other words, if all workstation (primary file) output is being conditioned, and a point in the cycle is reached where output would normally be displayed, but there is no output, because it is all conditioned, the program just ends. or... If all screen output is conditioned with NKG and F7 is pressed, then there is no screen to display. When a program like this ended, it was usually because of a bug. But I suppose someone could have designed this deliberatly. Dave
05-24-2000, 06:01 AM
Ted, The normal RPG cycle will turn on LR when the last record of a primary file is read. Notice that there are probably indicators in the I-specs with notations pointing to some output/protect field on the video? When these indicators are not on, LR will turn on during processing. Whoever did that is using and ASS U ME on that one, as it is not clear and presents unprdeictable results if the indicators (many I'm sure) are not set just right. I suggest that you do turn on LR, forsaking less lines of code for a more readable program. What state are you in Now? Later, Bret Myrick
05-24-2000, 06:18 AM
<font color=blue>Normal Cycle output that does not have anything conditioned to output will end the program.</font> Thanks. <font color=blue>When a program like this ended, it was usually because of a bug. But I suppose someone could have designed this deliberatly.</font> It must be deliberate. I've worked on several programs like this. No LR indicator anyway. I have never written a production RPG II interactive program that used the cycle. (I wrote one test pgm when I was learning.) Anyway, not setting on LR explicitly sounds like poor programming to me.
05-24-2000, 06:25 AM
<font color=blue>I suggest that you do turn on LR, forsaking less lines of code for a more readable program. What state are you in Now?</font> I thought about adding a line to turn on LR, but decided not to because the pgm works, all I'm doing is modifying the screen layouts, replacing 1-3 fields with one new field. I'm still in Mississippi.
05-24-2000, 06:57 AM
Ted, I agree. If "It works, don't break it". I also think it is poor programming, but I remember being on the 34 & 36 and saving a line of code could mean the difference between having to reorg the disk or not, during the day. Mississippi: Wife and I are going to come over there in June, so I can show off my black jack and craps skills to the casino owners. Don't worry. I purchased a non-refundable round-trip ticket. :) Later, Bret "Black Jack Shalack" Myrick
05-24-2000, 07:58 AM
<PRE> What state are you in Now? I'm still in Mississippi. </PRE> Ted, considering that you're working with RPGII code, the question may not be concerened with your physical location, rather your state of mind. ha!
05-24-2000, 08:06 AM
If there is a "DR" coded on the output specs, LR may be set on automagically. Dave
05-24-2000, 08:20 AM
Shannon, Now, now. Don't make fun of Mr. Holt. If we be nice to him, he might just bring us a big pot of gumbo or jumbolia! How about some of those big 'ol shrimp from the Gulf? Isn't Jumbo Shrimp and oxymoron? :) Bret Myrick
05-24-2000, 10:49 AM
Bret, I seriously doubt if you're intentions are disrespectful, but speaking only for myself, I don't like this tone on the forums at all. Placing things in writing, can have a very different connotation, than when speaking person to person. What comes across, may not be what you intended by the reader. Keep in mind we have people from all over the world accessing the posts herein. A few of them would love to have the license to spread dissent and animosity with <u>ad homynym</u> messages. When that has happened in the past, it has led to post after post without merit. Let's keep it positive, and the humor self denigrating. <tt>BTW Explaining the shortcomings of MS and Unix is O.K.</tt> Dave
05-24-2000, 10:54 AM
<font color=blue>Now, now. Don't make fun of Mr. Holt. If we be nice to him, he might just bring us a big pot of gumbo or jumbolia! How about some of those big 'ol shrimp from the Gulf?</font> You're out of luck, Bret. I live at the opposite end of the state, about 5 miles (8 km) from Tennessee. I'm a hillbilly.
05-24-2000, 11:02 AM
<font color=blue>BTW Explaining the shortcomings of MS and Unix is O.K.</font> Which MS? Microsoft or Mississippi? <IMG > SRC="http://home.earthlink.net/~tmeinen/faces/bigsmilewnk.gif" ALT="wink smile" WIDTH="20" HEIGHT="20">
05-24-2000, 11:32 AM
Ted, Worked with a guy from that neck 'o the woods when we worked for a company out of Ohio. Ken McGrew is his name. With me being from Oklahoma, him from Tennesee and a guy named Greg from Louisiana. Boy what a team. We could do just about everything, except make the yankee's in Vermont and Boston understand what the heck we were saying. Greg fixed up some good craw-fish and jumbolia one night, and poor 'ol Ken about died eating the mild sauce! What a hoot! Ken worked for a tire place in TN, Goodyear, I think, before he came to work for us. Oh well, have a steak and some taters instead of Cajun. (although cajun steak is pretty good.) Later, Bret Myrick
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.