How to prevent + sign or ‘More’ from displaying on Synon generated display file when no records left to load?

140 pts.
Tags:
Synon
Synon 2E
Synon/2E
Synon/Cool 2E
For a Synon generated display file, how do you get the + sign or the 'More' to not show when there are no more records to display in subfile?

Software/Hardware used:
AS400 Synon 2e

Answer Wiki

Thanks. We'll let you know when a new response is added.

Ah

So this was the question?

In the function options for the function – you set the options to use text instead of a plus sign.

here…

Subfile End . . . . . . . : M ( M-MDLVAL, P-Plus, T-Text )

the current model level default will be highlighted.
If you want all subfiles to always use text – set the model level default, then you can forget about it.

Its a bad idea to mess with generated code – “e or any other generator. If, for some perverse reason, you wanted to do that with 2e then do it via a scan and replace command, built into the subfile function as user source. – then you can forget about it (until you have So forgotten that you lose the source, or work on a version or…

Summary – just use the option provided for the purpose.

BTW Tom – its not an obscure attribute, unless you count that it is on the second page of options you can set up for a subfile.
Or, of course a search in the PDF manuals supplied with theproduct would have shown it up in one go.

Discuss This Question: 17  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    What kind of subfile is it -- page-at-a-time, expanding or load-all? Tom
    125,585 pointsBadges:
    report
  • Trbeesley
    It is a simple synon generated subfile with line wrap so it can display 6 records single line or 3 records with two lines each.
    140 pointsBadges:
    report
  • Ankita
    Unless you press the pagedn ... "+" or "More..." appears..
    135 pointsBadges:
    report
  • Trbeesley
    The problem has been around for a while according to some old school Synon developers. What happens is Synon generates the subfile code that on initial load of subfile turns on indicator 80 (+), then proceeds to read records until subfile is filled. When the logic to check for more records is executed immediately after last subfile is filled it determines there are no records to read and exits subroutine, leaving indicator on. When user interacts with screen by pressing page down, no more records exist so the same subfile page is displayed but now without the + sign as it should be. So the problem is in the intital subfile load. The real problem is when there are screen scraper programs running over subfile, they freak out when they expect more records because the + is present but no more records are presented.
    140 pointsBadges:
    report
  • NickHutcheson1
    I am not familiar with Synon or screen scraper applications. You have answered your own question. You said 80 is set on at the beginning of the load routine. Set off the sflend indicator when there are no more records, before exiting the routine. A lot of people use the same indicator on the read as the sflend.
    1,380 pointsBadges:
    report
  • Trbeesley
    Synon generates the Cobol code. We don't modify generated code. The question is how do we make Synon generate code that turns off the indicator or the + when no more records are available. Manually changing the code would result in the code being overwritten the next time synon regenerates the code, which could be multiple times per release. Thanks for your post.
    140 pointsBadges:
    report
  • TomLiotta
    We don’t modify generated code. It isn't necessary to modify it. Just look at it. The generated subfile DDS will show the conditioning indicator that is required for the SFLEND keyword. Once you know the indicator and whether it is conditioning as on or off, all that's really required is to set it to the appropriate state in the action diagram (are they still called that?) Tom
    125,585 pointsBadges:
    report
  • Trbeesley
    Synon isn't as simple as turning off an indicator.
    140 pointsBadges:
    report
  • TomLiotta
    Synon isn’t as simple as turning off an indicator. True. But SFLEND is that simple. If Synon no longer allows any access to indicators at all nor any means of directly embedding a source statement in an action diagram, then it's beyond help. In the past, I might have created a user function that would hold direct source if I needed such code. I'd invoke it at the point where it was relevant. Because it would be separate from the main function, I wouldn't be concerned about directly modifying its isolated source, and I wouldn't have to modify anything in the main code. But if that kind of thing can't even be done in more current Synon, then I'm out of ideas. Tom
    125,585 pointsBadges:
    report
  • Trbeesley
    Tom, You are tracking along the path that screams "do me", but I am hesitant to embed user source for something that should work out of the generated code. Synon does allow most of what you are saying, but when I multiply that by all of the subfiles in production, then you start to see the slippery slope we don't want to go down. Your comments are appreciated.
    140 pointsBadges:
    report
  • TomLiotta
    ...but when I multiply that by all of the subfiles in production,... Aye, there's the rub. It's certainly possible that this issue is covered by some obscure Synon attribute. It's also possible that it simply has never been addressed by the vendor. I wouldn't expect a large group of Synon developers in this forum. Most of those work at least one level removed from topics popular here. What is mostly seen here are Synon beginners looking for resources. But full CASE tools remove developers from most of the elements you'll see discussed. The appropriate forums would necessarily be much more specialized. I was involved with Synon/1, beginning before Synon/2 was available. Then into Synon/2 when many bugs were in the product, and quite a while before Synon/2E and later incarnations came around. But much of the reason for involvement was in fact because of how difficult some tasks could be in the first releases. In any case, it's specialized; so you'll probably want a more specialized site for focused answers. Tom
    125,585 pointsBadges:
    report
  • Trbeesley
    Thanks again Tom. I was curious as to your thoughts on the following solution submitted in another forumn. The more records indicator gets turned off when physical EOF is encountered so runtime record selection can result in a logical EOF (no additional records will be selected for display) before physical EOF is encountered. Executing *QUIT when logical EOF is reached will exit the load loop but leave on the more records indicator because physical EOF has not been reached. This can be avoided by invoking a RTVOBJ based on the same ACP as the main function to actually position the read cursor to physical EOF. Create a SET EOF function for an ACP by defining a RTVOBJ function based on the ACP with NEITHER/POS parameters for all of the ACP keys and in the init exit point of the RTVOBJ set each of POS parameters to the highest possible value for the data type. This will position the read cursor to EOF when the function is invoked. (In the worst case the RTVOBJ will execute two reads if there is actually a record with the highest possible key value.) Once the read cursor has been moved to physical EOF the built in load routines of the primary function will do the rest automatically, i.e., detect EOF, set off the more records indicator and exit the load loop.
    140 pointsBadges:
    report
  • TomLiotta
    So this was the question? Although this seems to be the question, the proposed answer doesn't seem to be appropriate. The proposed answer is apparently about whether a "+" or a "More..." flag or some text(?) should be shown for a subfile to show additional pages being available. But the question seems to be how to get the "+" to stop showing on the last page of a subfile. Does choosing 'T'ext cause the "+" to appear on all subfile pages except the last page? If so, it's an interesting solution. (At least, it is to me. I wouldn't have thought of it.) Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    I was curious as to your thoughts on the following solution... Personally, I like my suggestion to create a simple user function that sets the indicator, but this one seems to try hard to stay within the pure model environment. That can easily be the appropriate choice if strict adherence is needed. But I can't see how it addresses the larger problem of getting many application subfile functions changed. In that element, it's no different from my suggestion. To me, the obvious "fix" would involve a change to the product so that it wasn't a problem to begin with. But if it's been around for 20 years, it seems unlikely ever to be "fixed". Tom
    125,585 pointsBadges:
    report
  • Yorkshireman
    I interpreted the question a bit into 'make the 'more' indaication work correctly. ' No need to fool around with user functions. If this is a 2e function then just use the facilities you paid for. It works correctly, displays 'more' or '+' - your chooice, and you can amend the text if you want, if there is more data, and doesn't if there isn't. I don't see what's difficult about the concept of 'working as intended/expected' R
    5,580 pointsBadges:
    report
  • TomLiotta
    @Trbeesley: If you look at your model, do you have a setting for this?
    Subfile End . . . . . . . : M ( M-MDLVAL, P-Plus, T-Text ) 
    If so, what is it? If not, why not? Also, can you post a link for where you found the "solution submitted in another forum"? It might be interesting to see the entire thread there. Tom
    125,585 pointsBadges:
    report
  • Yorkshireman
    'when no records left to load Just to record, for completeness, that if records have been loaded, the final page of a Synon function will show 'Bottom' - if text display is selected. If there are no records at al, then it will say so. If your scan limit is set such that an entire page has not been filled after the limit expires, then a message will be emitted saying 'press page down for more records' or somesuch, and the user can then scan another (scan limit value) number of records. On a millions long file where you have exacting records selection, it allows a get out for the user. and I, too, would be interested in the 'other forum' discussion.
    5,580 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following