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



Recommendation after 30 years of building screens. Always make any screen
field move explicit, never implicit.

By that I mean, fields in the display or print file should always have a
unique name and you should always move to them explicitly. It will just
save a ton of time in debugging and modify the code.

My standard is to always use a character on the front for I (Input),
O(Output), B(Both), H (Hidden), P(Parameter) for how the field is used (I
know I will hear the screaming).

For example, field customer number used as a output field in a subfile
would be O_CUSTNO. If used in a Edit/Display Panel, it would be B_CUSNO.

So in every given cases you know exactly when the field is loaded in your
code. If you do this, you will not have any problem with having the same
field name in your program as in display file and trying to guess where it
got loaded.

If you have questions on screens, I would be happy to help.



On Thu, Jul 19, 2018 at 10:05 AM Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

Whatever the problem it is highly unlikely (near impossible) for it to be
a fixed/free issue. Under the covers the two are identical.

But you are obviously not showing all of your code because the dcl-proc
should be followed by a dcl-pi and there isn't one there.

Variables within a subprocedure are local and therefore would not normally
be available to display without copying it somewhere.

The fact that it has the same name in the subprocedure as it has on the
file means you have _two_ versions of the field Qty in the program - one
global (the file version) and one local (the GetHazmat version). The global
version will always be the one used by any display file output (unless Data
Structure I/O is used which is not th case here as Qty is a stand-alone.

All of which is to say that your fixed form version must have a value
being placed in the global Qty field and you free version doesn't.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jul 19, 2018, at 6:29 AM, jyoung@xxxxxxxxxxxxx wrote:

I have an interesting question. (very new dev here) Let's say my
display file has a output field named Qty. In fixed format, the program
declares a standalone variable Qty and sets the message. The display file
shows the message when I run the program.

P GetHazmat B
D Qty S 40 Inz('G = Gallon, GP = 5 Gallon Pail')

However, if I try to do the same in free format, the message will not
display. I assume because the Qty variable is being created again? But then
why does it work fixed format? I know to solve the issue is just to not
declare it again as a standalone in free format, but that doesn't solve my
curiosity. Does anyone have some clarification?

Dcl-proc GetHazmat;
Dcl-S Qty Char(40) Inz('G = Gallon, GP = 5 Gallon Pail');

Thanks,
Jeffrey Young



Subject to Change Notice:

WalzCraft reserves the right to improve designs, and to change
specifications without notice.

Confidentiality Notice:

This message and any attachments may contain confidential and privileged
information that is protected by law. The information contained herein is
transmitted for the sole use of the intended recipient(s) and should "only"
pertain to "WalzCraft" company matters. If you are not the intended
recipient or designated agent of the recipient of such information, you are
hereby notified that any use, dissemination, copying or retention of this
email or the information contained herein is strictly prohibited and may
subject you to penalties under federal and/or state law. If you received
this email in error, please notify the sender immediately and permanently
delete this email. Thank You

WalzCraft PO Box 1748 La Crosse, WI, 54602-1748
www.walzcraft.com<http://www.walzcraft.com> Phone: 1-800-237-1326
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

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

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.