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



We don't like to leave something in MSGW (at least not a user-run job),
because users have been known to answer the message on an update program and
screw something up, leaving us to clean up the mess. I'd just as soon do my
own error handling and save them (and us) the trouble. I take extra care
when writing RPG code, for example, to try to cover all the bases,
error-wise (for example, I never assume the record isn't there already
before a WRITE - I do a SETLL first and only WRITE if NOT %EQUAL). But some
of this stuff goes back to 1992 and isn't written as cleanly. I'm converting
them to ILE and RPG 4 whenever I can, and adding my stuff where I can, but
we have over 1,000 programs out there.

This kind of error handling isn't what I do all the time - but this
particular code comes from an FTP job which, if it fails, has to be
restarted from scratch, since it will just overwrite the work file that it
didn't get the first time. Besides, it will run under QSYSOPR - not a user
who feels compelled to answer run-time error messages.

In case you were curious, the MONMSG after the SNDPAGMSG is there because we
only copied the command object to the development box so the programs will
compile - there is no CPP for the command on development).


Francis Lapeyre
IS Dept. Programmer/Analyst
Stewart Enterprises, Inc.
E-mail: flapeyre@xxxxxxxx 



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Tuesday, January 31, 2006 4:27 PM
To: Midrange Systems Technical Discussion
Subject: RE: MONMSG CPF2130 was: CL program

We too use LXI.  I'd just as soon leave the job in a message wait and have
their other monitors page that the job is stuck in a MSGW.  That way manual
intervention could be done.  Like I said before, it's often easier to fix a
problem and issue an R to retry then restart a job.

Looks like we're going to have to agree to disagree.  Perhaps it looks nasty
in a review at your shop to have jobs stuck in MSGW.  Me, I have the buggers
page the VP of IS hoping he comes up with a plan to deal with these
situations.  Pages him every 15 minutes until the message is gone.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Lapeyre, Francis" <FLAPEYRE@xxxxxxxx> 
Sent by: midrange-l-bounces@xxxxxxxxxxxx
01/31/2006 04:53 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
"'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
cc

Fax to

Subject
RE: MONMSG CPF2130 was: CL program






             PGM

             DCL        VAR(&JOB) TYPE(*CHAR) LEN(10) 
             DCL        VAR(&NBR) TYPE(*CHAR) LEN(6) 
             DCL        VAR(&USER) TYPE(*CHAR) LEN(10) 

/* Trap all unmonitored errors. Page the on-call programmer.         */ 
             MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(ERROR)) 
 
 /* Get job attributes to put in pager message in case of a problem. */ 
              RTVJOBA    JOB(&JOB) USER(&USER) NBR(&NBR) 

... Normal processing ...

             RETURN 
 
/* Error processing (general). */ 
 ERROR:      LXIPAG/SNDPAGMSG MSG('Job' *BCAT &NBR *TCAT '/' *TCAT + 
                          &USER *TCAT '/' *TCAT &USER *BCAT 'had an + 
                          unexpected error. See job log and dumps + 
                          for job.') TOUSERS((PROGRAMMER AR)) 
             MONMSG     MSGID(CPF0000) 
             DMPCLPGM 
 
             ENDPGM 

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Tuesday, January 31, 2006 3:17 PM
To: Midrange Systems Technical Discussion
Subject: RE: MONMSG CPF2130 was: CL program

Ok, so "maybe" you got 1 & 3 covered.  Don't know how that translates into
"None", but ok.
In a case like this, I'd like to get the hard halt if the CRTDUPOBJ fails 
so
that I can shoot the developer who bypassed Turnover (we, too, use that
software.  Guess which vendor discovered the V5R4 ftp anomaly the hard 
way?
((but quickly had a fix)) ).  Or handle manually any of the myriad of 
other
possible situations, like the RI constraints, etc.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Lapeyre, Francis" <FLAPEYRE@xxxxxxxx> 
Sent by: midrange-l-bounces@xxxxxxxxxxxx
01/31/2006 03:56 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
"'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
cc

Fax to

Subject
RE: MONMSG CPF2130 was: CL program






None of those things will happen, because our production box is locked 
down
to the point where not even programmers have command-line authority. All
programming is done on a development machine and things get sent over with 

a
change management package (Turnover). &COMMONLIB is determined at run time
by a RTVOBJD on a file and returning the library it's in. 

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Tuesday, January 31, 2006 1:57 PM
To: Midrange Systems Technical Discussion
Subject: RE: MONMSG CPF2130 was: CL program

You got the CPF3142 on the CLRPFM, not on the CRTDUPOBJ.

How else could this have failed on the CRTDUPOBJ, since you use adopted
authority?  Well I can only think of a few dozen ways.
1 - Someone recompiled the program and took away the adopted authority.
2 - File got corrupted.  Yes this even happens with DB2-UDB for the 
iSeries
albeit damn rare.
3 - File did not exist in &COMMONLIB.
4 - &COMMONLIB got deleted.
5 - Someone added a trigger or referential constraint to the file and it
doesn't like being duped into QTEMP.
... and the list goes on...

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Lapeyre, Francis" <FLAPEYRE@xxxxxxxx> 
Sent by: midrange-l-bounces@xxxxxxxxxxxx
01/31/2006 02:47 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
"'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
cc

Fax to

Subject
RE: MONMSG CPF2130 was: CL program






Yes there is (the global MONMSG CPF0000). Anyway, if you get a CPF3142, 
the
file isn't in QTEMP, so how could a CRTDUPOBJ fail? (All our programs use
adopted authority, so that won't be a problem). 

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Tuesday, January 31, 2006 12:20 PM
To: Midrange Systems Technical Discussion
Subject: RE: MONMSG CPF2130 was: CL program

Like that code...
But there is no checking to see what happens if the CRTDUPOBJ fails. Which
seems to happen a lot here.  And not because it already exists in the 
TOLIB.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Lapeyre, Francis" <FLAPEYRE@xxxxxxxx> 
Sent by: midrange-l-bounces@xxxxxxxxxxxx
01/31/2006 11:34 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
"'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
cc

Fax to

Subject
RE: MONMSG CPF2130 was: CL program






Here is what I am doing in a program (duplicating a physical and an
associated logical into QTEMP):

/* Clear temporary decrypted file. Create (as a clone of AROCC)      */ 
/* if not found. Also create AROCCL6 logical.                        */ 
             CLRPFM     FILE(QTEMP/AROCC) 
             MONMSG     MSGID(CPF3142) EXEC(CRTDUPOBJ OBJ(AROCC) + 
                          FROMLIB(&COMMONLIB) OBJTYPE(*FILE) + 
                          TOLIB(QTEMP)) 
             CHKOBJ     OBJ(QTEMP/AROCCL6) OBJTYPE(*FILE) 
             MONMSG     MSGID(CPF9801) EXEC(CRTDUPOBJ OBJ(AROCCL6) + 
                          FROMLIB(&COMMONLIB) OBJTYPE(*FILE) + 
                          TOLIB(QTEMP)) 

The program could possibly get called more than once in a job, so there is
no sense in deleting and recreating it every time it's called - the file
just needs to be empty.
You can't do a CLRPFM on a logical, obviously, so I'm just checking for
existence and duplicating it if not found.

Francis Lapeyre
IS Dept. Programmer/Analyst
Stewart Enterprises, Inc.
E-mail: flapeyre@xxxxxxxx 


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Tuesday, January 31, 2006 10:21 AM
To: Midrange Systems Technical Discussion
Subject: Re: MONMSG CPF2130 was: CL program

Yes you can CRTDUPOBJ more than one file.  You can do it a couple of ways.

1 - Use generics and one command.
CRTDUPOBJ OBJ(MYFILE*) FROMLIB(MYLIB) OBJTYPE(*FILE) MONMSG ...

2 - Or single string them.
CRTDUPOBJ OBJ(MYFILE1) FROMLIB(MYLIB) OBJTYPE(*FILE) MONMSG ...
CRTDUPOBJ OBJ(MYFILE2) FROMLIB(MYLIB) OBJTYPE(*FILE) MONMSG...

They both have their pro's and con's.  You may like the latter method if 
you
only care that a particular object did not dup - and not why it didn't 
dup.
But I suppose that same philosophy could be applied to the former. 
Clean up of the objects that did dup in case of failure in the latter case
may be easier to handle.  Then again, if you're going to QTEMP a simple
CLRLIB QTEMP is quite succinct.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com

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