|
Tim Truax wrote: > > Hello all and Thanks in advance for your answers: > > We have the CL below that we put together but the submitted CHGDTAARA > command is not working...why? This job was put together to hold up our > S36 side processing until we are sure that several 3rd party software > SUBMITTED AS400 jobs have copmpleted running. Initially we put the word > MOVING into the data array then we submit the CHGDTAARA that will not > run until all the previously submitted As400 jobs are complete then the > data array will have the value DONE placed in it, then our CL Loop will > self terminate...we thought... The submitted CHGDTAARA command isn't > working but when we go in from a screen and do the CHGDTAARA command to > change our data array to be DONE it stops the loop sequence. > > PGM > DCL VAR(&TEST) TYPE(*CHAR) LEN(6) > /* -------------------------------------------------- */ > /* INIIALIZE MOVETEST DATA AREA WITH 'MOVING' */ > /* -------------------------------------------------- > */ > CHKOBJ OBJ(EDIDATA/MOVETEST) OBJTYPE(*DTAARA) > MONMSG MSGID(CPF9801) EXEC(CRTDTAARA + > DTAARA(EDIDATA/MOVETEST) TYPE(*CHAR) + > LEN(6)) > CHGDTAARA DTAARA(EDIDATA/MOVETEST (1 6)) VALUE('MOVING') > > /* ---------------------------------------------------- */ > /* SUBMIT A JOB TO CHANGE DATA AREA THEN TEST FOR CHANGE*/ > /* -----------------------------------------------------*/ > > SBMJOB CMD(CHGDTAARA DTAARA(EDIDATA/MOVETEST (1 6)) + > VALUE('DONE ')) JOBPTY(5) > TESTIT: RTVDTAARA DTAARA(EDIDATA/MOVETEST (1 6)) RTNVAR(&TEST) > IF COND(&TEST *EQ 'MOVING') THEN(GOTO + > CMDLBL(TESTIT)) > > ENDPGM One possibility - that's a real NASTY CPU intensive loop you've coded there. When you check with WRKACTJOB isn't this job sucking up a huge percentage of available CPU cycles ? If your batch job is submitted to change the dataarea, and it runs at the same priority as this job (probably 50), maybe it can never get hold of the dataarea to change it. When you run the CHGDTAARA interactively it would run at a higher priority (usually 20) and could probably interrupt this nasty little loop in order to make the change. Try changing the loop to the following: SBMJOB CMD(CHGDTAARA DTAARA(EDIDATA/MOVETEST (1 6)) + VALUE('DONE ')) JOBPTY(5) TESTIT: RTVDTAARA DTAARA(EDIDATA/MOVETEST (1 6)) RTNVAR(&TEST) IF COND(&TEST *NE 'MOVING') THEN(RETURN) DLYJOB DLY(60) /* Wait 60 seconds */ GOTO CMDLBL(TESTIT) Even if this doesn't solve your problem, you should do it anyway to avoid the tight CPU loop. -- ... Neil Palmer AS/400~~~~~ ... NxTrend Technology - Canada ____________ ___ ~ ... Markham, Ontario, Canada |OOOOOOOOOO| ________ o|__||= ... Phone: (905) 731-9000 x238 |__________|_|______|_|______) ... web:http://www.nxtrend.com oo oo oo oo OOOo=o\ ... mailto:npalmer@nxtrend.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the Midrange System Mailing List! To submit a new message, * * send your mail to "MIDRANGE-L@midrange.com". To unsubscribe from * * this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe MIDRANGE-L' in the body of your message. Questions * * should be directed to the list owner / operator: david@midrange.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.