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



it was an old thing I wrote to get rid of leading zeros when CHGVAR a number to character.
dec 5 with value of 10 whould show as 00010. i got annoyed.

TRMLEAD0 was an utility that accepted max 50 char string, so it could be used in a variety of things.

I guess %TRIML could now be used.

Bryan

MidrangeL wrote on 12/7/2022 8:30 AM:
Nice!  What does command TRMLEAD0 do?

I'm assuming it does some sort of trimming, but what might that be, maybe taking the leading zeros out of the character string?  It goes from 6 characters to 50.  Not sure why.


--
Jim Oberholtzer
Chief Technical Architect
Agile Technology Architects


------ Original Message ------
From "Bryan Dietz" <bdietz400@xxxxxxxxx>
To midrange-l@xxxxxxxxxxxxxxxxxx
Date 12/6/2022 10:20:03 AM
Subject Re: CMD to tell when there are no jobs in a subsystem

Simple example  cmd/cl:

              CMD        PROMPT('RTN the # of jobs in subsystem')
              PARM       KWD(SUBSYSTEM) TYPE(SBS) MIN(1) +
                           PROMPT('Subsystem name')

  SBS:        QUAL       TYPE(*NAME) LEN(10) MIN(1)
              QUAL       TYPE(*CHAR) LEN(10) DFT(*LIBL) +
                           SPCVAL((*LIBL)) PROMPT('Library')


PGM PARM(&SBSlib)
DCL &SBSLIB *CHAR 20
DCL &SBS *CHAR stg(*defined) defvar(&sbslib 1 ) len(10)
DCL &LIB *CHAR stg(*defined) defvar(&sbslib 11) len(10)
DCL &SPACE *CHAR 100
DCL &ACT *CHAR stg(*defined) defvar(&space  29) len(10)
DCL &NBR *CHAR stg(*defined) defvar(&space  73) len( 4)
DCL &LEN *CHAR 4
DCL &ERROR *CHAR 8 (X'0000000000000000')
DCL &TOT *CHAR   6
DCL &TOT1 *CHAR 50

   CHGVAR     VAR(%BIN(&LEN)) VALUE('100')
   CALL       PGM(QWDRSBSD) PARM(&SPACE &LEN SBSI0100 &SBSLIB &ERROR)
   MONMSG     MSGID(CPF1608) EXEC(DO)
        SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('The +
        subsystem ' || &SBS *tCAT ' in ' || &LIB *TCAT ' is not found.')
        GOTO       CMDLBL(END)
   ENDDO
   CHGVAR     VAR(&TOT) VALUE(%BIN(&NBR))
   TRMLEAD0   INPUT(&TOT) OUTPUT(&TOT1)
   SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('The +
      number of jobs active in ' || &LIB *TCAT +
     '/' || &SBS *BCAT 'is ' *cat &TOT1 *tcat ' & the sbs is ' || &ACT)

END: ENDPGM



Bryan

Paul E Musselman wrote on 12/5/2022 2:00 PM:
QWDRSBSD is a better solution--  doesn't even need a User Space!

--Paul E Musselman


.

On 12/5/22 2:36 PM, James H. H. Lampert via MIDRANGE-L wrote:
On 12/5/22 11:22 AM, Jerry Draper wrote:
Sorry. A bit vague.

We have a job that submits a bunch of jobs to a subsystem.

Using CL we need to be able to confirm when all those jobs are complete and there are no jobs in that subsystem.

Maybe a call to QWDRSBSD?

It takes a subsystem name, qualified with the library wherein the SBSD lives, and it returns such information as whether it's up, and the number of currently active jobs therein.

-- JHHL

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

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.