MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » January 2006

RE: MONMSG CPF2130 was: CL program



fixed

             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.





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact