i5 Database with wysiwyg Text.
You can combine i5 database, and Windows Wysiwyg text. Example, I have a programming project file with the project number, accumulated hours, status etc.. This information is stored in an iSeries DB file. The description of the programming steps, is kept in a Microsoft word document, with variable fonts, colors, graphics etc. A second document is kept for the installation steps.
The first section is from a subfile project update program. When option 2 is selected, Microsoft word is called passing the document name as parm 1 (x.doc x is the project number). There is only one rub, Microsoft word won't create a new document for new projects. Therefore, use subfile option 3 to create a new document file. It will call projcopy.bat, passing the project number as parameter 1. This program copies a template document, creating the base documents for the project. The subfile program also calls projcopy.bat (not shown) when records are added to the project DB file.
Requirements:
K: drive is a network drive, and every programmer uses the same drive letter.
Microsoft word is installed on each PC, program in the default directory.
STRPCO must be running, I put in the signon procedure.
*--Update a word document
C '2' IFEQ SEL001
C MOVE pjProj pjProjA 5
C EVAL CMDCL = 'STRPCCMD PCCMD(''+
C C:\Progra~1\micros~1\office\winword.exe +
C K:\PROJECTS\'
C Eval CmdCl = %Trim(CmdCL) +
C pjProjA + 'I.doc'')'
C CALL 'QCMDEXC'
C PARM CMDCL 256
C PARM 256 CMDLEN 15 5
C MOVE *BLANK SEL001
C UPDATE SUBFIL01
C END
*--Create word documents
C '3' IFEQ SEL001
C MOVE pjProj pjProjA 5
C EVAL CMDCL = 'STRPCCMD PCCMD(''+
C K:\PROJECTS\PROJCOPY.BAT'
C Eval CmdCl = %Trim(CmdCL) +
C ' ' + pjProjA + ''')'
C CALL 'QCMDEXC'
C PARM CMDCL 256
C PARM 256 CMDLEN 15 5
C MOVE *BLANK SEL001
C UPDATE SUBFIL01
C END
-------------- projcopy.bat -----------------------
rem %1 is project #
COPY K:\PROJECTS\00000D.DOC K:\PROJECTS\%1D.DOC
COPY K:\PROJECTS\00000I.DOC K:\PROJECTS\%1I.DOC
EXIT
The following are examples to start pc programs without having a mapped drive, and you do not have to identify the programs location or even the program name. Use the "start a file" PC command and the "file type" identifies the program to run. Example:
Note: