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



Hi,

I have isolated this problem, and I have created a small test program to demonstrate.

Basically, I have a DSPF with a field selection subfile - it has two fields. The first is a hidden field, the second is a output field conditioned on an indicator.

The program write two records to the subfile:
Record one has the conditioning indicator on, so the hidden field and the displayable field are both written to the subfile record. Record two has the conditioning indicator off, so only the hidden field is written to the subfile record.

After displaying the subfile (simply a blank page) I then loop on the two records and chain/update them. The first update succeeds but the second hangs and the program goes off with the fairies - the %CPU and the AUX I/O go through the roof (although no files are being accessed - apart from the subfile). The only way to stop the program is to sysreq 2 it. While this program hangs on the update, if I call the program in another job that hangs during program initialisation - I assume while attempting to allocate the display file object. Sometimes (?) when the second job has waited long enough, the first job will return with a MCH2601 and end. This allows the second job to allocate the display file object and proceed.

Obviously, writing a record to the subfile with only a hidden field is what is causing the problems to the display file object. But I can't understand why the record can be written in the first place.

It would appear that version is not important - we're on V5R3M0 and this happens if the program is compiled at this level or at V5R2M0.

Is it possible for any of you to verify if this happens on your machine? I would like to provide this information to IBM. The code is below:

display file - TEST_SFL
     **********************************************************************
    A                                      INDARA
    A                                      CA03(03 'F3_Exit')
    A                                      PRINT
     **********************************************************************
    A          R SFL1                      SFL

    A            TST_HIDDEN     1A  H
    A  60        TST_DISPLY     1A  O 10  2
     **********************************************************************
    A          R CTL1
    A                                      SFLCTL(SFL1)
    A                                      SFLSIZ(0015)
    A                                      SFLPAG(0015)
    A                                      OVERLAY
    A  70                                  SFLDSP
    A  71                                  SFLDSPCTL
    A  73                                  SFLCLR
    A  77                                  SFLEND
    A N77                                  PAGEDOWN
    A            @MSGF         10A  H
     **********************************************************************

Compiled with: CRTDSPF FILE(xxx/TEST_SFL) SRCFILE(xxx/QDDSSRC) SRCMBR(TEST_SFL) R
STDSP(*YES)


Program - TEST_SFL:
    HOPTION(*NODEBUGIO:*SRCSTMT:*SHOWCPY)
     **********************************************************************

     * Display file...
    fTEST_SFL  cf   e             workstn
    f                                     sfile(sfl1:#RRN1)
    f                                     indds(dspInd)
     **********************************************************************
    d testSubfile     pr                  extpgm('TEST_SFL')

    d testSubfile     pi
     **********************************************************************

     * Indicator DS for display file...
    d dspInd          ds
    d  f3Exit                 3      3n

     * Display control indicator...
    d  display               60     60n

     * Primary subfile indicators...
    d  sflDsp                70     70n
    d  sflDspCtl             71     71n
    d  sflClr                73     73n
    d  sflEnd                77     77n

     * Program variables...
    d idx             s              5u 0
    d #RRN1           s              4s 0
     **********************************************************************
     /free

        sflDsp    = *off;
        sflDspCtl = *off;
        sflClr    = *on;
        sflEnd    = *off;
        write ctl1;

        sflDsp    = *on;
        sflDspCtl = *on;
        sflClr    = *off;

        // Write line 1 - displaying field...
        display = *on;
        #RRN1 = 1;
        write sfl1;

        // Write line 2 - not displaying field...
        display = *off;
        #RRN1 = 2;
        write sfl1;

        sflEnd = *on;

      // Display screen...
      dow (1 = 1);
        exfmt ctl1;

        // If F3 pressed then leave loop...
        if f3Exit;
          leave;
        endif;

        // Update subfile 2 times...
        for idx = 1 to 2;
        chain idx sfl1;
          if %found(TEST_SFL);
            update sfl1;
          endif;
        endfor;

      enddo;

      *inLR = *on;
      return;
     /end-free
     **********************************************************************

Compiled with: CRTBNDRPG PGM(xxx/TEST_SFL) SRCFILE(xxx/QRPGLESRC) SRCMBR(TEST_SFL) DFTACTGRP(*NO) ACTGRP(*CALLER) DBGVIEW(*SOURCE) TGTRLS(V5R2M0)


Thanks for your help in this.

Cheers

Larry Ducie



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.