home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
3x400
/
dspm.lzh
/
FFD500.PGM
< prev
next >
Wrap
Text File
|
1989-01-11
|
13KB
|
290 lines
H
F* PROGRAM - FILE MEMBER MAINTENANCE & SELECTION PROGRAM
F* AUTHOR - DAVID J. KRAXNER DATE WRITTEN - 04/12/85
F*
F* 04/13/85 DJK - MODIFIED TO OUTPUT SELECTED MEMBER TEXT VIA
F* PROGRAM INPUT PARAMETER.
F* 05/14/87 HJJ - ENHANCED TO DISPLAY NUMBER OF RECORDS FOR
F* LOGICAL FILE MEMBERS.
F* 10/20/87 HJJ - ENHANCED TO USE CPYF COMMAND.
F*
F* TO COMPILE YOU MUST CREATE DSPFDMWK WITH THE FOLLOWING:
F*
F* DSPFD FILE(ffd500fm) TYPE(*MBRLIST) OUTPUT(*NONE) +
F* OUTFILE(DSPFDMWK.XXXXXXXX) OUTMBR(DSPFDMWK)
F*
F********************************************************************
F* INDICATOR USAGE MAP
F********************************************************************
F*
F* 40 - GENERAL USAGE
F*
F* 53 - QAEXEC EXECUTION ERROR INDICATOR
F* 50 - READ MBR OUTFILE CONTROL
F* 55 - READ CHANGES CONTROL
F*
F* * 90 - SLFEND, SUB-FILE END CONTROL
F* * 91 - SLFEND, PROGRAM MESSAGE QUEUE
F* * 95 - PROTECTS SUB-FILE SELECTION FIELD
F* * 98 - CONDITIONS FILE MEMBER SELECTIVITY ONLY
F*
F********************************************************************
FFFD500FMCF E WORKSTN KINFDS WSDS
F SFREC1KSFILE FFD500S1
FDSPFDMWKIF E DISK
FLOGREC IF E DISK UC
E FL 21 01 QUAL(FILE.LIBRARY)
E TRC 3 5 0 RRN OF TO MBR
E FRC 3 5 0 RRN OF TO MBR
E TMB 3 10 TO MEMBER NAME
E FMB 3 10 FROM MEMBER NAME
E K 80 80 01 DSPFD Command
I DS
I 1 50 MLMTXT
I 1 40 SFMTXT
I DS
I 1 80 CMDCPY
I 1 5 CPY
I 7 27 FQUL
I 29 49 FQUL2
I 51 60 FRMMBR
I 62 71 TOMBR
I 73 80 WCOPT
I*
ICMD DS 80
I* COMMAND NAME
I 1 10 CMD1
I* OBJECT/LIBRARY NAME
I 12 32 CMD2
I* MEMBER NAME
I 34 43 CMD3
IWSDS DS
I B 378 3790DSSFL#
I SDS
I *PROGRAM PGMSGQ
I *STATUS STATUS
I 40 46 MSGID
I 254 263 USERID
C/EJECT
C *ENTRY PLIST
C PARM CLRRMV 1 CLRPFM/RMVM
C PARM MEMBER 10 MEMBER SELECTED
C PARM TEXT 50 MEMBER SELECTED
C*
C CLRRMV IFEQ 'N' TEST FOR NO
C MOVE '1' *IN98 CLEAR OR REMOVE
C END AUTHORITY
C*
C MOVE '*REPLACE'WCOPT
C MOVE '1' *IN90 SFLEND
C MOVE '1' *IN91 SFLEND
C Z-ADD0 SFREC1
C*
C *IN55 DOUEQ'1' ACCESS WORK
C READ DSPFDMWK 55FILE RECORDS
C *IN55 IFEQ '0' UNTIL ALL READ
C ADD 1 SFREC1
C MLNRCD IFEQ 0
C MLFILA ANDEQ'*LGL'
C EXSR FNDLOG
C END
C WRITEFFD500S1 55WRITE RECORDS
C END
C N55 END
C*
C SFREC1 IFEQ 0 DEFAULT
C Z-ADD1 SFREC1 WRITE
C WRITEFFD500S1
C END
C*
C Z-ADD1 SFLRCD
C PROMPT TAG DISPLAY SUBFILE
C Z-ADD0 WKCHG# 30
C WRITEMSGCTL PGMMSGQ
C EXFMTFFD500C1
C Z-ADDDSSFL# SFLRCD
C*
C *INKA CABEQ'1' ENDPGM LRCMD 1 - EOJ
C*
C MOVE '0' *IN55
C Z-ADD0 Q 30
C Z-ADD0 R 30
C *IN55 DOUEQ'1' READS CHANGED
C READCFFD500S1 55SUB-FILE
C *IN55 IFEQ '0' RECORDS
C*
C SFTEST IFEQ '1' SELECTED FILE
C MOVE MLNAME MEMBER
C MOVE MLMTXT TEXT
C MOVE ' ' SFTEST
C ADD 1 WKCHG#
C END
C*
C *IN98 IFEQ '0' PROCESS CLRPFM
C SFTEST IFEQ 'F'
C ADD 1 Q
C Z-ADDSFREC1 FRC,Q
C MOVE MLNAME FMB,Q
C ADD 1 WKCHG#
C END
C SFTEST IFEQ 'T'
C ADD 1 R
C Z-ADDSFREC1 TRC,R
C MOVE MLNAME TMB,R
C ADD 1 WKCHG#
C END
C SFTEST CASEQ'R' MAINT OR RMVM REQUEST
C SFTEST CASEQ'C' MAINT
C END
C END
C*
C MOVE ' ' SFTEST UPDATE SUB-FILE
C UPDATFFD500S1 & REDISPLAY
C MOVE '0' *IN95
C*
C END
C N55 END
C*
C Q CASNE0 COPY
C END
C*
C WKCHG# CABGT0 PROMPT RE-DISPLAY???
C*
C ENDPGM TAG
C*
C MOVE '1' *INLR
C*
C********************************************************************
C* PROCESSES FILE MEMBER MAINTENANCE
C********************************************************************
CSR MAINT BEGSR
C*
C SFTEST IFEQ 'C' SET-UP COMMAND
C MOVEL'CLRPFM' CMD1 NAME TO EXECUTE
C EXSR QUAL BUILD QUALIFIED
C MOVELQOBJ CMD2 FILE NAME
C MOVE MLNAME CMD3
C EXSR EXECMD EXECUTE COMMAND
C *IN53 IFEQ '0' SET-UP COMMAND
C Z-ADD0 MLNRCD
C END
C ELSE
C MOVEL'RMVM ' CMD1
C EXSR QUAL BUILD QUALIFIED
C MOVELQOBJ CMD2 FILE NAME
C MOVE MLNAME CMD3
C EXSR EXECMD EXECUTE COMMAND
C *IN53 IFEQ '0' SET-UP COMMAND
C Z-ADD0 MLNRCD
C MOVE '******' MLCHGD
C MOVE '******' MLCHGT
C MOVE *BLANKS SFMTXT
C MOVEL'*REMOVED'SFMTXT
C SUB 1 MLNOMB
C MOVE '1' *IN95
C END
C END
C ADD 1 WKCHG#
C*
C*
CSR ENDSR
C********************************************************************
C* BUILD QUALIFIED OBJECT LIBRARY NAME
C********************************************************************
CSR QUAL BEGSR
C*
C MOVEA*BLANKS FL
C MOVEAMLFILE FL,1
C Z-ADD1 X 30
C *BLANK LOKUPFL,X 40
C MOVE '.' FL,X
C ADD 1 X
C MOVEAMLLIB FL,X
C MOVEAFL QOBJ 21
C*
CSR ENDSR
C*****************************************************************
C FNDLOG BEGSR
C*****************************************************************
C*
C OPENMB IFNE 'Y'
C MOVE 'Y' OPENMB 1
C EXSR QUAL
C MOVEAFL K,7
C MOVEAK CMD
C EXSR EXECMD
C OPEN LOGREC
C END
C*
C READ LOGREC 50
C *IN50 IFEQ '0'
C Z-ADDMBBOR MLNRCD
C END
C*
C ENDSR
C********************************************************************
C* COPY MEMBERS TO OTHER MEMBERS
C********************************************************************
CSR COPY BEGSR
C*
C EXSR QUAL
C MOVEAFL FQUL
C MOVEAFL FQUL2
C*
C *INKD IFEQ '1'
C MOVEL'?' CPY
C MOVE 'CPYF' CPY
C ELSE
C MOVE 'CPYF ' CPY
C END
C*
C DO
C FMB,1 IFNE *BLANKS
C MOVE FMB,1 FRMMBR
C END
C TMB,1 IFNE *BLANKS
C MOVE TMB,1 TOMBR
C Z-ADD80 LENGTH SET INITIAL
C CALL 'QCAEXEC' 53 VALUE FOR
C PARM CMDCPY COMMAND LENGTH
C PARM LENGTH
C FRC,1 CHAINFFD500S1 50
C *IN50 IFEQ '0'
C Z-ADDMLNRCD HLDFRM 50
C END
C *IN53 IFNE '1'
C TRC,1 CHAINFFD500S1 50
C *IN50 IFEQ '0'
C WCOPT IFEQ '*REPLACE'
C Z-ADDHLDFRM MLNRCD
C UPDATFFD500S1
C ELSE
C WCOPT IFEQ '*ADD '
C ADD HLDFRM MLNRCD
C UPDATFFD500S1
C END
C END
C END
C END
C END
C END
C*
C ENDSR
C********************************************************************
C* EXECUTE A COMMAND VIA QCAEXEC IBM PROGRAM
C********************************************************************
CSR EXECMD BEGSR
C*
C Z-ADD80 LENGTH 155 SET INITIAL
C CALL 'QCAEXEC' 53 VALUE FOR
C PARM CMD COMMAND LENGTH
C PARM LENGTH
C*
C MOVE *BLANKS CMD
C*
CSR ENDSR
C/EJECT
O/EJECT
** K - BUILDS DSPFD COMMAND
DSPFD TYPE(*MBR) OUTPUT(*NONE) OUTFILE(LOGREC.QTEMP)