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



In the example previously sent (see below), I failed to mention that you
would need to change the names (LINE01, LINE02 and CTLNAM) to be the names
of your line(s) and Control.

Yes Mike you can create one or two CL's one to do what you are asking:
Here is an example using two CL's:
VARYFIRST:  PGM       
            VRYCFG     CFGOBJ(LINE01) CFGTYPE(*LIN) STATUS(*OFF)
            VRYCFG     CFGOBJ(LINE02) CFGTYPE(*LIN) STATUS(*ON )

            VRYCFG     CFGOBJ(CTLNAM) CFGTYPE(*CTL) STATUS(*ON)
                RCLRSC
                ENDPGM

VARYBACK:  PGM       
            VRYCFG     CFGOBJ(LINE01) CFGTYPE(*LIN) STATUS(*ON )
            VRYCFG     CFGOBJ(LINE02) CFGTYPE(*LIN) STATUS(*OFF)

            VRYCFG     CFGOBJ(CTLNAM) CFGTYPE(*CTL) STATUS(*OFF)
                RCLRSC
                ENDPGM


You could also create one CL passing in a parm telling the CL which one you
are going to do:

VARYOFFON:  PGM        PARM(&WHICH)

            DCL        VAR(&WHICH) TYPE(*CHAR) LEN( 5)  /* WHICH ONE TO DO
*/

/* VARY OFF AND ON FOR THE FIRST TIME
*/
            IF         COND(&WHICH *EQ 'FIRST') THEN(DO)
            VRYCFG     CFGOBJ(LINE01) CFGTYPE(*LIN) STATUS(*OFF)
            VRYCFG     CFGOBJ(LINE02) CFGTYPE(*LIN) STATUS(*ON )

            VRYCFG     CFGOBJ(CTLNAM) CFGTYPE(*CTL) STATUS(*ON)
            GOTO       CMDLBL(EOJ)
            ENDDO

/* VARY OFF AND ON GOING BACK
*/
            IF         COND(&WHICH *EQ 'BACK ') THEN(DO)
            VRYCFG     CFGOBJ(LINE01) CFGTYPE(*LIN) STATUS(*OFF)
            VRYCFG     CFGOBJ(LINE02) CFGTYPE(*LIN) STATUS(*ON )

            VRYCFG     CFGOBJ(CTLNAM) CFGTYPE(*CTL) STATUS(*ON)
            GOTO       CMDLBL(EOJ)
            ENDDO

EOJ:        RCLRSC
            ENDPGM
        
Then just do a CALL VARYOFFON PARM('FIRST') to do it the first time.
Then just do a CALL VARYOFFON PARM('BACK ') to set it back.

Jim Rubino
Senior Business Systems Analyst
FIKE CORPORATION
704 South 10th Street
Blue Springs, Mo.? 64013
(816)?229-6216? Ext. 213
?

-----Original Message-----
From: Wills, Mike N. (TC) [mailto:MNWills@xxxxxxxxxxxxxx]
Sent: Wednesday, March 05, 2003 11:36 AM
To: Midrange - Midrange-L (E-mail)
Subject: Question on varying off things.


Once in a while we have to disable one *LIN device and enable a different
one. Currently I do:

WRKCFGSTS *LIN 
then disable and enable the items I need.
then 
WRKCFGSTS *CTL 
to enable one more thing.

Then I have to do the opposite when I am done. Is there I way I can do this
in a CL? What command would I use?

Mike Wills
iSeries Programmer
Taylor Corporation
mnwills@xxxxxxxxxxxxxx
(507) 386-3187
Fax: (507) 625-3002

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




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.