Thanks Adam
Subversion is a bit more than I want to take on right now.
I did this to solve the problem. A simple solution, but I believe it will
work for us.
Setup pdm option E - we now use E to edit instead of 2
The option simply does a strseu and cpytostmf
upon exit the file will be stored in the IFS as
mbr_lib_srcfile_date_time.
we will have to purge the directory intermittantly and move the data to a
cd or ?
If we need to we can use a pc tool to do a text compare.
Work with User-Defined Options
S1013BCA
File . . . . . . . : QAUOOPT Member . . . . . . :
QAUOOPT
Library . . . . : MIS_PDMOPT Position to . . .
:
Type options, press
Enter.
2=Change 3=Copy 4=Delete
5=Display
Opt Option
Command
C CALL
&O/&N
E jseu lib(&l) file(&f)
mbr(&N)
created command jseu
CMD PROMPT('STRSEU THEN
CPYTOSTMF')
PARM KWD(LIB) TYPE(*CHAR) LEN(10)
PROMPT(LIBRARY)
PARM KWD(FILE) TYPE(*CHAR) LEN(10)
PROMPT(FILE)
PARM KWD(MBR) TYPE(*CHAR) LEN(10)
PROMPT(MBR)
created program jseucl
PGM PARM(&LIB &FILE &MBR
&error)
DCL VAR(&LIB) TYPE(*CHAR)
LEN(10)
DCL VAR(&file) TYPE(*CHAR)
LEN(10)
DCL VAR(&mbr ) TYPE(*CHAR)
LEN(10)
DCL VAR(&error) TYPE(*CHAR)
LEN(1)
DCL VAR(&FROMMBR ) TYPE(*CHAR)
LEN(100)
DCL VAR(&TOSTMF ) TYPE(*CHAR)
LEN(100)
DCL VAR(&DATE ) TYPE(*CHAR)
LEN(6)
DCL VAR(&TIME ) TYPE(*CHAR)
LEN(6)
DCL VAR("E) TYPE(*CHAR) LEN(1)
VALUE(X'7D')
RTVSYSVAL SYSVAL(QDATE)
RTNVAR(&DATE)
RTVSYSVAL SYSVAL(QTIME)
RTNVAR(&TIME)
STRSEU SRCFILE(&LIB/&FILE) SRCMBR(&MBR) OPTION(2)
/* PUT TO SOURCE ARCHIVE
*/
CHGVAR VAR(&FROMMBR)
+
VALUE("E *TCAT
+
'/QSYS.LIB' *TCAT
+
'/' *TCAT &LIB *TCAT '.LIB ' *TCAT
+
'/' *TCAT &FILE *TCAT '.FILE' *TCAT
+
'/' *TCAT &MBR *TCAT '.MBR ' *TCAT
+
"E)
CHGVAR VAR(&TOSTMF )
+
VALUE("E *TCAT
+
'/USERDATA' *TCAT
+
'/SOURCEARCHIV' *TCAT
+
'/' *TCAT
+
&MBR *TCAT
+
'_' *TCAT &LIB *TCAT
+
'_' *TCAT &FILE *TCAT
+
'_' *TCAT &DATE *TCAT
+
'_' *TCAT &TIME *TCAT
+
'.TXT' *TCAT
+ "E)
CPYTOSTMF FROMMBR(&FROMMBR) TOSTMF(&TOSTMF) +
STMFCODPAG(*PCASCII)
ENDPGM
message: 3
date: Fri, 03 Oct 2008 12:06:32 -0400
from: Adam Glauser <adamglauser@xxxxxxxxxxxx>
subject: Re: Calling a program after modifying a source member
JDHorn@xxxxxxxxxxxxxx wrote:
> Every time I replace a source member, I want to make a copy to a
stream
> file in the ifs.
>
> This will archive changes we make to the source members. We will
always
> be able to see before and after images of the source members if we
need
> to.
If you haven't already, I'd suggest you look in to a version control
system (VCS) for your files. There are quite a few to choose from. You
can choose free or proprietary, no-cost and commercial.
Subversion, for example, has the benefit of saving only the differences
between files when you add a new revision. If you have any large source
files where you routinely make small changes (I'm thinking of things
like menus and 'work with' panels), you may find that saving the entire
source file each time adds up to a lot of space quickly. Another benefit
is that such systems usually have good tools for visualizing what has
changed between versions.
Aaron Bartell has some articles and code available that could help you
out if you decide to use Subversion:
http://www.mowyourlawn.com/SystemiSVN.html
HTH,
Adam
Jim Horn
This email is intended only for the person or entity
to which it is addressed and may contain information
that is privileged, confidential or otherwise protected
from disclosure. If you are not the named addressee
or an employee or agent responsible for delivering
this message to the named addressee, you are not
authorized to read, print, retain copy, and disseminate
this message or any part of it. If you have received this
message in error please notify us immediately by email,
discard any paper copies and delete all electronic files
of this message.
This email is intended only for the person or entity
to which it is addressed and may contain information
that is privileged, confidential or otherwise protected
from disclosure. If you are not the named addressee
or an employee or agent responsible for delivering
this message to the named addressee, you are not
authorized to read, print, retain copy, and disseminate
this message or any part of it. If you have received this
message in error please notify us immediately by email,
discard any paper copies and delete all electronic files
of this message.
As an Amazon Associate we earn from qualifying purchases.