|
From: shahar mor <shahar_mor@yahoo.com> > my company is doing some projects for changing ccsid > to files. The problem is that the file members change > date and time is updated and this is bad news for > source file. > > Can some one point me of how to set back the member > change date and time via mi ? (i know mi but i dont > have access to the required structures) Here is a program to Get/Set member info (and a little testprogram). The programs are from my eBook about MI (http://leif.org AS/400 Corner). DCL SPCPTR .PARM-CONTROL PARM; DCL SPCPTR .PARM-INFO PARM; DCL OL PARAMETERS(.PARM-CONTROL, .PARM-INFO) EXT PARM MIN(2); DCL DD PARM-CONTROL CHAR(32) BAS(.PARM-CONTROL); DCL DD PARM-OPERATION CHAR(1) DEF(PARM-CONTROL) POS(1); /* G - GET INFO FOR MBR */ /* S - SET INFO FOR MBR */ DCL DD PARM-FEEDBACK CHAR(1) DEF(PARM-CONTROL) POS(2); /* BLANK - OK */ /* E - ERROR */ DCL DD PARM-LIBRARY CHAR(10) DEF(PARM-CONTROL) POS(3); /* *LIBL OR BLANK - LIBRARY LIST */ DCL DD PARM-FILE CHAR(10) DEF(PARM-CONTROL) POS(13); DCL DD PARM-MEMBER CHAR(10) DEF(PARM-CONTROL) POS(23); /* *FIRST OR BLANK - FIRST MEMBER */ DCL DD PARM-INFO CHAR(73) BAS(.PARM-INFO); DCL DD PARM-TYPE CHAR(10) DEF(PARM-INFO) POS(1); DCL DD PARM-DATE CHAR(13) DEF(PARM-INFO) POS(11); DCL DD PARM-TEXT CHAR(50) DEF(PARM-INFO) POS(24); DCL SPCPTR .ODP-ROOT; DCL SPCPTR .MBR-CONTROL-BLOCK; DCL SPC ODP-ROOT BAS(.ODP-ROOT); DCL DD ODP-STATUS CHAR(4) DIR; DCL DD ODP-DEV-LENGTH BIN(4) DIR; DCL DD ODP-OPEN-SIZE BIN(4) DIR; DCL DD ODP.OPEN-FEEDBCK BIN(4) DIR; DCL DD ODP.DEV-NAMELIST BIN(4) DIR; DCL DD ODP.IO-FEEDBACK BIN(4) DIR; DCL DD ODP.LOCK-LIST BIN(4) DIR; DCL DD ODP.SPOOL-OUTPUT BIN(4) DIR; DCL DD ODP.MBR-DESCR BIN(4) DIR; DCL DD ODP.CUR-IN-REC BIN(4) DIR; DCL DD ODP.CUR-OUT-REC BIN(4) DIR; DCL DD ODP.OPEN-DMCQ BIN(4) DIR; DCL DD ODP.OUTSTANDINGS BIN(4) DIR; DCL DD * CHAR(12) DIR; DCL SYSPTR .ODP-CURSOR DIR; DCL SPCPTR * DIR; DCL SPCPTR .ODP-CDM-ERROR DIR; DCL SPCPTR .ODP-INPUT-BUFFER DIR; DCL SPCPTR .ODP-OUTPUT-BUFFER DIR; DCL DD ODP.CDM-CLOSING BIN(2) DIR; DCL DD ODP-DEV-NAME-IDX BIN(2) DIR; DCL DD ODP-NBR-OF-DEVS BIN(2) DIR; DCL DD ODP-SEQUENCE-NBR BIN(4) DIR; DCL DD ODP-REC-LENGTH BIN(2) DIR; DCL DD ODP-REC-LENGTH2 BIN(2) DIR; DCL DD ODP-NBR-OF-*RDS BIN(2) DIR; DCL DD ODP-RELEASE-NBR BIN(2) DIR; DCL DD ODP-OPEN-POSN CHAR(1) DIR; DCL DD ODP-OVR-REC-LEN BIN(2) DIR; DCL DD ODP-COM-DEV-CNT BIN(2) DIR; DCL DD ODP.INPUT-BPCA BIN(4) DIR; DCL DD ODP.OUTPUT-BPCA BIN(4) DIR; DCL DD ODP............ CHAR(1) DIR; DCL SPC MBR-CONTROL-BLOCK BAS(.MBR-CONTROL-BLOCK); DCL SYSPTR .MCB-DATA-SPACE-INDEX DIR; DCL SPCPTR .MCB-QUERY-SPACE DIR; DCL SPCPTR .MCB-HEADER DIR; DCL SPCPTR .MCB-UFCB-LAST-LOCK DIR; DCL SPCPTR .MCB-GET-OPTION-LIST DIR; DCL DD MCB-GET-OPT-LIST CHAR(132) DIR; DCL SPCPTR .MCB-PUT-OPTION-LIST DIR; DCL DD MCB-GET-OPT-SAVE CHAR(4) DIR; DCL DD MCB-PUT-OPT-SAVE CHAR(10) DIR; DCL DD * CHAR(3) DIR; DCL DD MCB-LAST-EXCPTID CHAR(7) DIR; DCL DD MCB-IO-SWITCHES CHAR(4) DIR; DCL DD MCB-REC-WAIT BIN(4) DIR; DCL DD MCB-TRANSF-UNIT BIN(2) DIR; DCL DD MCB-WRITE-RATIO BIN(2) DIR; DCL DD MCB-WRITE-COUNT BIN(2) DIR; DCL DD MCB-RECS-LOCKED BIN(2) DIR; DCL DD MCB-IO-SWITCHES2 CHAR(1) DIR; DCL DD MCB-FORMAT-PGM CHAR(10) DIR; DCL DD MCB-FORMAT-LIB CHAR(10) DIR; DCL DD MCB-EXPIRE-DATE CHAR(7) DIR; DCL DD MCB-JOIN-TYPE CHAR(1) DIR; DCL DD * CHAR(1) DIR; DCL DD MCB-VARIOUS BIN(2) DIR; DCL DD MCB-REC-UPD-LOCK BIN(4) DIR; DCL DD MCB-MBR-UPD-LOCK BIN(2) DIR; DCL DD MCB-MBR-FMT-SUBS BIN(2) DIR; DCL DD MCB-INV-REC-LOCK BIN(4) DIR; DCL DD MCB-COMMIT-INS BIN(2) DIR; DCL DD MCB-COMMIT-UPD BIN(2) DIR; DCL DD MCB-COMMIT-DLT BIN(2) DIR; DCL DD MCB-RECS-CLRPFM BIN(4) DIR; DCL DD MCB-EOF-DELAY BIN(4) DIR; DCL DD MCB-KEY-SAVEAREA CHAR(28) DIR; DCL DD MCB-RECS-PROCSD BIN(4) DIR; DCL DD MCB-RECS-RETRVD BIN(4) DIR; DCL DD MCB.DDM-SECTION BIN(4) DIR; DCL DD * CHAR(8) DIR; DCL DD MCB-KEY-LENGTH BIN(2) DIR; DCL DD MCB-FMT-LENGTH BIN(2) DIR; DCL DD MCB-MAX-KEY-LEN BIN(2) DIR; DCL DD MCB-NBR-OF-KEYS BIN(2) DIR; DCL DD MCB............ CHAR(1) DIR; DCL SPC MBR-HEADER BAS(.MCB-HEADER); DCL SYSPTR .MHDR-PREV-MCB DIR; DCL SYSPTR .MHDR-NEXT-MCB DIR; DCL SYSPTR .MHDR-FILE-CB DIR; DCL SYSPTR .MHDR-SHARE-DIR DIR; DCL SYSPTR .MHDR-DATA-DICT DIR; DCL DD MHDR-STATUS CHAR(2) DIR; DCL DD * CHAR(2) DIR; DCL DD MHDR-TEXT CHAR(50) DIR; DCL DD MHDR-TYPE CHAR(10) DIR; DCL DD * CHAR(10) DIR; DCL DD MHDR-CHANGE-DATE CHAR(13) DIR; DCL DD MHDR-CREATE-DATE CHAR(13) DIR; DCL DD MHDR-PREFRD-UNIT CHAR(1) DIR; DCL DD MHDR-ALLOC-TYPE CHAR(2) DIR; DCL DD MHDR-INIT-RECS BIN(4) DIR; DCL DD MHDR-RECS-EXTEND BIN(2) DIR; DCL DD MHDR-NBR-EXTENDS BIN(2) DIR; DCL DD MHDR-RECOVER-OPT CHAR(1) DIR; DCL DD MHDR-SAVE-DATE CHAR(13) DIR; DCL DD MHDR-RSTR-DATE CHAR(13) DIR; DCL DD MHDR-%-DLT-ALLOW CHAR(1) DIR; DCL DD MHDR.USER-AREA BIN(4) DIR; DCL DD MHDR-OLD-S-DATE CHAR(13) DIR; DCL DD MHDR-OLD-R-DATE CHAR(13) DIR; DCL DD MHDR........... CHAR(1) DIR; DCL SPC FILE-CONTROL-BLOCK BAS(.MHDR-FILE-CB); DCL DD FCB-FLAGS BIN(2) DIR; DCL DD FCB-LENGTH BIN(4) DIR; DCL DD FCB-SCOPE-ENTS BIN(2) DIR; DCL DD FCB-KEY-SPECS CHAR(14) DIR; DCL DD FCB-AUTHORITY CHAR(10) DIR; DCL DD FCB-PREF-UNIT CHAR(1) DIR; DCL DD FCB-MAX-MBRS BIN(2) DIR; DCL DD FCB-MAX-WAIT BIN(2) DIR; DCL DD FCB-WRITE-RATIO BIN(2) DIR; DCL DD FCB-NBR-MBRS BIN(2) DIR; DCL DD * CHAR(20) DIR; DCL DD FCB-TIMESTAMP CHAR(13) DIR; DCL DD FCB-TEXT-LENGTH BIN(2) DIR; DCL DD FCB-TEXT CHAR(50) DIR; DCL DD FCB-COMPILER-ID CHAR(13) DIR; DCL DD FCB-SOURCE-FILE CHAR(10) DIR; DCL DD FCB-SOURCE-MBR CHAR(10) DIR; DCL DD FCB-SOURCE-LIB CHAR(10) DIR; DCL DD FCB-PHYS-ATTRS CHAR(55) DIR; DCL DD FCB-LOGL-ATTRS CHAR(55) DIR; DCL SYSPTR .FCB-FIRST-MBR DIR; DCL SYSPTR .FCB-LAST-MBR DIR; DCL SYSPTR .FCB-ACCESS-SHARING DIR; DCL SYSPTR .FCB-DATA-SHARING DIR; DCL DD FCB............ CHAR(1) DIR; DCL SPC PROCESS-COMM-AREA BASPCO; DCL SPCPTR PCO-POINTER DIR; DCL SPC SYSTEM-ENTRY-POINT-TABLE BAS(PCO-POINTER); DCL SPCPTR .SEPT(2047) DIR; DCL DD UFCB CHAR(214) BDRY(16); DCL SPCPTR .UFCB-ODP DEF(UFCB) POS( 1); DCL SPCPTR .UFCB-INBUF DEF(UFCB) POS( 17); DCL SPCPTR .UFCB-OUTBUF DEF(UFCB) POS( 33); DCL SPCPTR .UFCB-OPEN-FEEDBACK DEF(UFCB) POS( 49); DCL SPCPTR .UFCB-IO-FEEDBACK DEF(UFCB) POS( 65); DCL SPCPTR .UFCB-NEXT-UFCB DEF(UFCB) POS( 81); DCL DD * CHAR(32) DEF(UFCB) POS( 97); DCL DD UFCB-FILE CHAR(10) DEF(UFCB) POS(129); DCL DD UFCB-LIB-ID BIN(2) DEF(UFCB) POS(139); DCL DD UFCB-LIBRARY CHAR(10) DEF(UFCB) POS(141); DCL DD UFCB-MBR-ID BIN(2) DEF(UFCB) POS(151); DCL DD UFCB-MEMBER CHAR(10) DEF(UFCB) POS(153); DCL DD UFCB-DEVICE-NAME CHAR(10) DEF(UFCB) POS(163); DCL DD UFCB-DEVICE-INDEX BIN(2) DEF(UFCB) POS(173); DCL DD UFCB-FLAGS-1 CHAR(1) DEF(UFCB) POS(175) INIT(X'80'); DCL DD UFCB-FLAGS-2 CHAR(1) DEF(UFCB) POS(176) INIT(X'00'); DCL DD UFCB-REL-VERSION CHAR(4) DEF(UFCB) POS(177); DCL DD UFCB-INV-MK-COUNT BIN (4) DEF(UFCB) POS(181); DCL DD UFCB-MORE-FLAGS CHAR(1) DEF(UFCB) POS(185); DCL DD * CHAR(23) DEF(UFCB) POS(186); DCL DD UFCB-RECORD-ID BIN (2) DEF(UFCB) POS(209) INIT(1); DCL DD UFCB-RECORD-LENGTH BIN (2) DEF(UFCB) POS(211) INIT(92); DCL DD UFCB-NO-MORE-PARMS BIN (2) DEF(UFCB) POS(213) INIT(32767); DCL SPCPTR .UFCB INIT(UFCB); DCL OL OPEN(.UFCB); DCL OL CLOSE(.UFCB); DCL CON CLOSE-ENTRY BIN(2) INIT(11); DCL CON OPEN-ENTRY BIN(2) INIT(12); DCL CON *LIBL BIN(2) INIT(-75); DCL CON *FIRST BIN(2) INIT(-71); DCL CON THE-LIB BIN(2) INIT(72); DCL CON THE-MBR BIN(2) INIT(73); DCL CON SPACES CHAR(10) INIT; DCL DD OPTION-ID BIN(2); DCL SPC OPEN-FEEDBACK BAS(.UFCB-OPEN-FEEDBACK); DCL DD OPFB-FILE-TYPE CHAR(2) DIR; DCL DD OPFB-FILE CHAR(10) DIR; DCL DD OPFB-LIBRARY CHAR(10) DIR; DCL DD OPFB-SPOOL-FILE CHAR(10) DIR; DCL DD OPFB-SPOOL-LIBRARY CHAR(10) DIR; DCL DD OPFB-SPOOL-NBR BIN(2) DIR; DCL DD OPFB-RECORD-LENGTH BIN(2) DIR; DCL DD OPFB-RECORD-LENGTH2 BIN(2) DIR; DCL DD OPFB-MEMBER CHAR(10) DIR; DCL DD OPFB-IN-BUFFER-SIZE BIN(4) DIR; DCL DD OPFB-OUT-BUFFER-SIZE BIN(4) DIR; DCL DD OPFB-DEVICE-CLASS BIN(2) DIR; DCL DD OPFB-OPENING-LOCATION CHAR(3) DIR; DCL DD OPFB-NBR-OF-ROWS BIN(2) DIR; DCL DD OPFB-NBR-OF-COLS BIN(2) DIR; DCL DD OPFB-NBR-OF-RECS BIN(4) DIR; DCL DD OPFB-CUR-RECORD-NBR BIN(4) DIR; DCL DD OPFB........... CHAR(1) DIR; DCL SPC IO-FEEDBACK BAS(.UFCB-IO-FEEDBACK); DCL DD IOFB-OFFSET-TO-DEV-DEP BIN(2) DIR; DCL DD IOFB-NBR-OF-PUTS BIN(4) DIR; DCL DD IOFB-NBR-OF-GETS BIN(4) DIR; DCL DD IOFB-NBR-OF-PUTGETS BIN(4) DIR; DCL DD IOFB-NBR-OF-OTHERS BIN(4) DIR; DCL DD IOFB-CURRENT-OPR CHAR(1) DIR; DCL DD IOFB-PREVIOUS-OPR CHAR(1) DIR; DCL DD IOFB-RECORD-FMT-NAME CHAR(10) DIR; DCL DD IOFB-ACTUAL-DEV-TYPE CHAR(1) DIR; DCL DD IOFB-ACTUAL-DEV-CLASS CHAR(1) DIR; DCL DD IOFB-ACTUAL-DEV-NAME CHAR(10) DIR; DCL DD IOFB-ACTUAL-REC-LENGTH BIN(4) DIR; DCL DD IOFB-REQUEST-ID CHAR(80) DIR; DCL DD IOFB-NBR-OF-RECS BIN(2) DIR; DCL DD * BIN(4) DIR; DCL DD IOFB-CUR-RECORD-NBR BIN(4) DIR; DCL DD IOFB........... CHAR(1) DIR; DCL EXCM EXCEPTION-LIST EXCID(H'0000') BP(ERROR-DETECTED) IGN; /**************************************************************/ ENTRY * (PARAMETERS) EXT; TEST-OPERATION: CPYBLA PARM-FEEDBACK, SPACES; CMPBLA(B) PARM-OPERATION, "G"/EQ(OPEN-THE-MEMBER); CMPBLA(B) PARM-OPERATION, "S"/EQ(OPEN-THE-MEMBER); OP-ERROR-EXIT: CPYBLA PARM-FEEDBACK, "O"; RTX *; OPEN-THE-MEMBER: CPYBLA UFCB-FILE, PARM-FILE; CPYNV OPTION-ID, THE-LIB; CMPBLAP(B) PARM-LIBRARY, "*LIBL", " "/NEQ(SET-LIBRARY); CMPBLAP(B) PARM-LIBRARY, " " , " "/NEQ(SET-LIBRARY); CPYNV OPTION-ID, *LIBL; SET-LIBRARY: CPYNV UFCB-LIB-ID, OPTION-ID; CPYBLA UFCB-LIBRARY, PARM-LIBRARY; CPYNV OPTION-ID, THE-MBR; CMPBLAP(B) PARM-MEMBER, "*FIRST", " "/NEQ(SET-MEMBER); CMPBLAP(B) PARM-MEMBER, " " , " "/NEQ(SET-MEMBER); CPYNV OPTION-ID, *FIRST; SET-MEMBER: CPYNV UFCB-MBR-ID, OPTION-ID; CPYBLA UFCB-MEMBER, PARM-MEMBER; CALLX .SEPT(OPEN-ENTRY), OPEN, *; SETSPPFP .ODP-ROOT,.UFCB-ODP; ADDSPP .MBR-CONTROL-BLOCK,.ODP-ROOT, ODP.MBR-DESCR; CMPBLA(B) PARM-OPERATION, "S"/EQ(SET-INFO-FOR-MBR); GET-INFO-FOR-MBR: CPYBLA PARM-TYPE, MHDR-TYPE; CPYBLA PARM-TEXT, MHDR-TEXT; CPYBLA PARM-DATE, MHDR-CHANGE-DATE; B CLOSE-ACCESS-PATH; SET-INFO-FOR-MBR: CPYBLA MHDR-TYPE, PARM-TYPE; CPYBLA MHDR-TEXT, PARM-TEXT; CPYBLA MHDR-CHANGE-DATE, PARM-DATE; CLOSE-ACCESS-PATH: CALLX .SEPT(CLOSE-ENTRY), CLOSE, *; RTX *; ERROR-DETECTED: CPYBLA PARM-FEEDBACK, "E"; RTX *; ----------------- DCL SPCPTR .ARG-CONTROL INIT(ARG-CONTROL); DCL DD ARG-CONTROL CHAR(32); DCL DD ARG-OPERATION CHAR(1) DEF(ARG-CONTROL) POS(1); DCL DD ARG-FEEDBACK CHAR(1) DEF(ARG-CONTROL) POS(2); DCL DD ARG-LIBRARY CHAR(10) DEF(ARG-CONTROL) POS(3); DCL DD ARG-FILE CHAR(10) DEF(ARG-CONTROL) POS(13); DCL DD ARG-MEMBER CHAR(10) DEF(ARG-CONTROL) POS(23); DCL SPCPTR .ARG-INFO INIT(ARG-INFO); DCL DD ARG-INFO CHAR(73); DCL DD ARG-TYPE CHAR(10) DEF(ARG-INFO) POS(1); DCL DD ARG-DATE CHAR(13) DEF(ARG-INFO) POS(11); DCL DD ARG-TEXT CHAR(50) DEF(ARG-INFO) POS(24); DCL OL ARGUMENTS (.ARG-CONTROL, .ARG-INFO) ARG; DCL SYSPTR .MIMBRINF; DCL DD RESOLVE CHAR(34); DCL DD RESOLVE-TYPE CHAR( 2) DEF(RESOLVE) POS( 1); DCL DD RESOLVE-NAME CHAR(30) DEF(RESOLVE) POS( 3); DCL DD RESOLVE-AUTH CHAR( 2) DEF(RESOLVE) POS(33) INIT(X'0000'); ENTRY * EXT; RESOLVE-TO-PGM: CPYBLA RESOLVE-TYPE, X'0201'; CPYBLAP RESOLVE-NAME, "MIMBRINF", " "; RSLVSP .MIMBRINF, RESOLVE, *, *; LOAD-ARGUMENTS-AND-CALL: CPYBLA ARG-OPERATION, "GET"; CPYBLAP ARG-LIBRARY , "LSVALGAARD", " "; CPYBLAP ARG-FILE , "QMISRC" , " "; CPYBLAP ARG-MEMBER , "MIHELLO" , " "; CALLX .MIMBRINF, ARGUMENTS, *; BRK "1"; CPYBLA ARG-OPERATION, "SET"; CPYBLA ARG-DATE(11:3), "555"; CPYBLAP ARG-TEXT , "TEXT...", " "; CPYBLAP ARG-TYPE , "MIXX...", " "; CALLX .MIMBRINF, ARGUMENTS, *; BRK "2"; CPYBLA ARG-OPERATION, "GET"; CALLX .MIMBRINF, ARGUMENTS, *; BRK "3"; RTX *; +--- | This is the MI Programmers Mailing List! | To submit a new message, send your mail to MI400@midrange.com. | To subscribe to this list send email to MI400-SUB@midrange.com. | To unsubscribe from this list send email to MI400-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: dr2@cssas400.com +---
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.