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



Hello,

On 6/12/2020 2:47 PM, Jay Vaughn wrote:
the above ds is specified to correctly allocate the file(rcdfmt) to a ds as its supposed to.
when a char field is referenced in the dspf ds_window01.w1_char, it works fine, but when a numeric is defined, it will not return the value to the program.


I have never had a problem with this or heard of one before.  You didn't provide a ton of information, either... really, you just showed us how the DS was defined.   So, I thought I'd try to reproduce the problem on my own.

Unfortunately, I could not.  It worked perfectly for me.   Can you tell me what I must do differently to see the problem you're having?

Here's the code for the display file:

     A                                      DSPSIZ(24 80 *DS3)
     A                                      INDARA
     A          R DUMMY                     ASSUME
     A                                  1  2' '
     A          R WINDOW01
     A                                      CA03(03)
     A                                      OVERLAY
     A                                      WINDOW(5 10 10 60)
     A                                  2  9'Char field:'
     A            W1_CHAR       20   B  2 22
     A                                  4  6'Numeric field:'
     A            W1_NUMERIC     9  2B  4 22EDTWRD('       .  ')
     A                                  6  4'Another numeric:'
     A            W1_ANOTHER     9  0B  6 22
     A                                  9  2'F3=Exit'


And the code for the RPG (deliberately coded in fixed format for V6R1, since that seemed to be what you were trying to do in your example):

     H DFTACTGRP(*NO)

     D showWindow1     PR

      /free
        showWindow1();
        *inlr = *on;
      /end-free

     P showWindow1     B
     FJAYD      CF   E             WORKSTN
     D                 PI
     Dds_window01      ds likerec(Window01:*ALL) inz
      /free
       dou *in03 = *on;

         exfmt Window01 ds_Window01;

         dsply ds_window01.w1_char;
         dsply ds_window01.w1_numeric;
         dsply ds_window01.w1_another;

       enddo;

      /end-free
     P                 E

Please advise how I can reproduce the problem...?



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.