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



you miss the write of the window before any write or exfmt that refer to the
window.

----- Original Message ----- 
From: "Captain Jerry" <captainjerry@xxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Sent: Friday, May 19, 2006 5:29 PM
Subject: Window Does Not Exist?


> Hi all,  Now I've got a "strange subfile problem" ~ Must be the day for
> them...
>
> A small subfile test program that I have, compiles fine, but errors on the
> initial Write to the control-record (with SFLCLR Indicator *On, and all
> other's off) with "Window does not exist" (CPF500A) The Cause says "An
> attempt was made to display a window record in a window that is not
> currently being displayed." (What? LOL)
>
> It's a subfile-in-a-window thing! Oh, it also works fine if I don't do an
> initial clear of the subfile!  If I load the subfile, execute format on
the
> control-record, and then clear the subfile, it works fine, but that's
> backwards!
>
> Here's the Display file and small test only program...
>
> A          R DSP12SFL                  SFL
> A  40                                  SFLNXTCHG
> A            S1SEL          1A  B  4  7COLOR(BLU)
> A            S1MODEL        5A  O  4 11
> A            S1YEAR         4S 0O  4 19
> A            S1DESC        40A  O  4 25
>
> A          R DSP12CTL                  SFLCTL(DSP12SFL)
>
> A                                      CF02
> A                                      CF24
> A                                      OVERLAY
> A  42                                  SFLDSP
> A                                      SFLDSPCTL
> A  41                                  SFLCLR
> A  42                                  SFLEND(*MORE)
> A                                      SFLSIZ(0320)
> A                                      SFLPAG(0010)
> A                                      WINDOW(DSP12RCD)
> A                                  2  6'Sel'
> A
> DSPATR(UL)
> A
> COLOR(WHT)
> A                                  2
> 11'Model#'
> A
> DSPATR(UL)
> A
> COLOR(WHT)
> A                                  2
> 19'Year'
> A
> DSPATR(UL)
> A
> COLOR(WHT)
> A                                  2 25'              Description
> -
> A
> '
> A
> DSPATR(UL)
> A
> COLOR(WHT)
> A            S1POSN         5A  B  3
> 11COLOR(BLU)
> A                                  3 17'<- Position
> to...'
> A
> COLOR(BLU)
>
>
> A          R
> DSP12RCD
> A                                      WINDOW(6 3 15 70
> *NOMSGLIN)
> A                                      WDWBORDER((*COLOR WHT) (*DSPATR HI
> -
> A                                      RI) (*CHAR
> '+-+||+-+'))
> A                                 15  7'F2=Return'
> A                                      COLOR(BLU)
> A                                 15 19'F24=Process'
> A                                      COLOR(BLU)
>
> =====================================================================
>
> fwkd111c_svcf   e             workstn sfile(dsp12sfl:rrn12)
>
> d rrn12           s              4  0
>
>  /free
>
>   *in41 = *on;
>   clear *in42;
>   write dsp12ctl; <- Errors here....
>
>   clear *in41;
>
>   s1model = 'xxxxx';
>
>   for rrn12 = 1 to 20; <- Just to load the subfile with test
> data.
>     write dsp12sfl;
>   endfor;
>
>   *in42 = *on;
>   write dsp12rcd;
>   exfmt dsp12ctl;
>
>   if *inkb;
>     *inlr = *on;
>   endif;
>
>  /end-free
> -- 
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>


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.