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



Hi, Peter:

I would suggest one small change, to make this "copy" operation entirely "safe":

PGM
DCL VAR(&DATE) TYPE(*CHAR) LEN(7)
ALCOBJ OBJ((LIBRARY1/ABC123 *DTAARA *EXCL))
ALCOBJ OBJ((LIBRARY2/ABC123 *DTAARA *EXCL))
RTVDTAARA DTAARA(LIBRARY1/ABC123) RTNVAR(&DATE
CHGDTAARA DTAARA(LIBRARY2/ABC123) VALUE(&DATE)
DLCOBJ OBJ((LIBRARY1/ABC123 *DTAARA *EXCL))
DLCOBJ OBJ((LIBRARY2/ABC123 *DTAARA *EXCL))
ENDPGM

This ensures that this operation is "atomic" and that no other jobs can alter either of the data areas during the "copy" operation.

HTH,

Mark S. Waterbury

> On 10/1/2010 10:53 AM, Peter_Vidal@xxxxxxxx wrote:
Looks like there is not too much of a clear / easy / cool option to take
here, so I decided to create a CLP:

PGM

DCL VAR(&DATE) TYPE(*DEC) LEN(7 0)
RTVDTAARA DTAARA(LIBRARY1/ABC123) RTNVAR(&DATE)
CHGDTAARA DTAARA(LIBRARY2/ABC123) VALUE(&DATE)

ENDPGM

A call to this program is now in place in our AS400 Scheduler to execute.

Thank you all for your tips, comments and insight on this subject and best
regards to all!


PETER VIDAL
PALL CORPORATION
SR System Analyst | WH Application Development
10540 Ridge Rd., Suite 203, New Port Richey, FL 34654-5111
727-815-3104 | Fax: 727-815-3120 | www.pall.com

"Imagination is more important than knowledge"
Albert Einstein (1879 - 1955)

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.