|
On cisc I remember that I did what you suggested (I used MODINX instead that has x'00A2' and patched to X'00A3' into LHRI). I also had to change to *system otherwise I got MCH6801. Is risc code the same ? It's difficult to understand why modsobj is blocked because from mi reference it seems that we can only change or reset the timestamp. Is it so dangerous ? ----- Original Message ----- From: <Gene_Gaunt@ReviewWorks.com> To: <mi400@midrange.com> Sent: Friday, November 15, 2002 2:22 PM Subject: Re: [MI400] Update Last Day used of a program > > Yes MI can change an object last used date. MODSOBJ is the instruction. > Operand one is a system pointer to target object. Operand two is a > modification options character scalar. > > If the options position 1, bit X'10', is on, then if the options position > 17, bit X'40', is on, then the two bytes in position 27 and 28 are the > first two bytes of an 8-byte system date/time stamp of the last used date > that you want. For example, X'8527' = 11/15/2002, and X'8529' = > 11/16/2002, get it. Here is an MI example: > > DCL SYSPTR ?OBJECT AUTO; > DCL DD OPTIONS AUTO CHAR(64); > DCL DD STAMP2 AUTO CHAR(2); > > CPYBREP OPTIONS, X"00"; > OR(S) OPTIONS(1:1), X"10"; > OR(S) OPTIONS(17:1), X"40"; > CPYBLA OPTIONS(27:2), STAMP2; > MODSOBJ ?OBJECT, OPTIONS; > > Of course you need code above this to: > (1) Fill ?OBJECT with a system pointer to your target object (RSLVSP is one > way). > (2) Fill STAMP2 with the first two bytes of a system date/time stamp of the > last used date that you want (QWCCVTDT API with output format '*DTS' is one > way). > > If the translator state blocks MODSOBJ from compiling, then change MODSOBJ > to SETDPAT, and compile. SETDPAT generates similar code to MODSOBJ, one > byte different. The system call vectored number for SETDPAT is X'0043', > for MODSOBJ is X'00A3'. With some tool like Display/Alter/Dump, change the > appropriate X'0043' to X'00A3', and there you have a Change Object Last > Used Date utility! > > _______________________________________________ > This is the MI Programming on the AS400 / iSeries (MI400) mailing list > To post a message email: MI400@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/mi400 > or email: MI400-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/mi400. > >
As an Amazon Associate we earn from qualifying purchases.
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.