+ Reply to Thread
Results 1 to 3 of 3

Thread: set indicator on in cl

  1. #1

    Default set indicator on in cl

    I need to seton an indicator then a cl program is read. It has to be right after the DCL statements. When SNDRCVF is reads and displays the prompt, I want to display different fields depending on if IN80 in on/off. If any suggestion on a better way, I am open to them. Thanks..... Willie

  2. #2
    Guest.Visitor Guest

    Default set indicator on in cl

    On Thursday, October 29, 1998, 10:59 AM, William Moore wrote: I need to seton an indicator then a cl program is read. It has to be right after the DCL statements. When SNDRCVF is reads and displays the prompt, I want to display different fields depending on if IN80 in on/off. If any suggestion on a better way, I am open to them. Thanks.....
    Willie, here is a sample piece of code, first you see the DDS source of the display where indicator 66 is used. A................................................. ......COLOR(PNK) A............look...................10A B 3 22CHGINPDFT(UL) A................................................. .............BLANKS(20) A................................................. .............CHECK(VNE) A..66............................................. ...........DSPATR(PR) A..66............................................. ...........DSPATR(HI) A..66............................................. ...........DSPATR(BL) A..37............................................. ...........DSPATR(PC) A .................................................. ...........COLOR(WHT) A .................................................. ..... 7.12'PF3' A .................................................. ............DSPATR(HI) A .................................................. .....7 32'Enter' A .................................................. ............DSPATR(HI)
    Ne4xt there is the sndrcvf in the CL that keys on the 66 indicator XMIT: + CHGVAR &IN66 '0' SNDRCVF RCDFMT(NAMELOOK1) CHGVAR VAR(&IN16) VALUE('0') IF COND(&IN03 *EQ '1') THEN(RETURN) IF COND(&IN12 *EQ '1') THEN(DO) CHGVAR &IN66 '0' ENDDO When this program is run it waits for the field to be filled and all is keyed off indicator 66. Based on whether 66 gets turned on or not your program can execute different do groups. Hope that helps.........

  3. #3
    Guest.Visitor Guest

    Default set indicator on in cl

    Willie, I am not sure I understand what you are asking. Please correct/clarify anything if I am going down the wrong path. You want to process a CL program that contains a display file and have certain fields displayed depending upon the status of indicator 80. The problem you are having is that you need to set &in80 before the CL is called. There are at least 2 common ways to handle this situation: the easiest way is to feed &in80 as a parameter to the CL. The second way would be to set the *LDA to a value so that it could be picked up inside the CL. Here are some of the relevant pieces of code.
    /* The calling CL program */dcl var(&in80)chgvar var(&in80) value('1') /* or '0' if you want it off */Call pgm(calledpgm) (&in80) /* The called CL program */pgm parm(&in80)/* &IN80 does not need to be DCL'd because the display file defines it */ 
    That's how you would do it with a passed parameter. Bill William Moore wrote: I need to seton an indicator then a cl program is read. It has to be right after the DCL statements. When SNDRCVF is reads and displays the prompt, I want to display different fields depending on if IN80 in on/off. If any suggestion on a better way, I am open to them. Thanks..... Willie

+ Reply to Thread

Similar Threads

  1. Page up Indicator is not ON
    By Guest.Visitor in forum Programming
    Replies: 4
    Last Post: 06-10-2001, 11:35 PM
  2. halt indicator 9 in on
    By wjminc in forum Programming
    Replies: 1
    Last Post: 05-11-2001, 10:29 AM
  3. No LR indicator in interactive pgm
    By T.Holt in forum Hardware
    Replies: 13
    Last Post: 05-24-2000, 11:32 AM
  4. Indicator dta structure
    By Guest.Visitor in forum Programming
    Replies: 3
    Last Post: 03-28-2000, 11:47 AM
  5. Indicator Variable
    By Guest.Visitor in forum Programming
    Replies: 1
    Last Post: 10-01-1999, 10:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts