News Stay informed about the latest enterprise technology news and product updates.

FNDLF: Find Logical File utility

FNDLF: Find Logical File utility

      *
      *  FNDLF:   Find Logical File utility.
      *
      *
     FQSYSPRT   O    F   80        PRINTER INFDS(PRTDS)
     F                                     OFLIND(*INOF)
     F                                     USROPN
     F                                     FORMLEN(66)
     F                                     FORMOFL(60)
      *
     FQADBFDEP  IF   E           K DISK
      *
     FQADBXREF  IF   E           K DISK
      *
     FADBKFLD0  IF   E           K DISK
      *
     FADBIFLD0  IF   E           K DISK
      *
      *
     D PRTDS           DS
     D  OVRFLW               188    189B 0
     D  LINE#                367    368B 0
      *
     D DSPCMD          C                   CONST('DSPSPLF -
     D                                     FILE(QSYSPRT) -
     D                                     SPLNBR(*LAST)')
      *
     D DLTCMD          C                   CONST('DLTSPLF -
     D                                     FILE(QSYSPRT) -
     D                                     SPLNBR(*LAST)')
      *
      *
     C     K@FDEP        KLIST
     C                   KFLD                    LIB
     C                   KFLD                    FILE
      *
     C     K@XREF        KLIST
     C                   KFLD                    DBFLDP
     C                   KFLD                    DBFFDP
      *
     C     K@KFLD        KLIST
     C                   KFLD                    DBFLDP                         Dep Library
     C                   KFLD                    DBFFDP                         Dep File
     C                   KFLD                    DBFRDP                         Record format
      *
     C     K@IFLD        KLIST
     C                   KFLD                    DBKLIB
     C                   KFLD                    DBKFIL
     C                   KFLD                    DBKFMT
     C                   KFLD                    DBKFLD
      *
      *
     C     *ENTRY        PLIST
     C                   PARM                    LIB              10
     C                   PARM                    FILE             10
     C                   PARM                    LFONLY            1
     C                   PARM                    PRINT             1
      *
      *
     C                   OPEN      QSYSPRT
     C                   MOVEL     *ALL'-'       DASHLN           78
     C     K@FDEP        CHAIN     QADBXREF                           LR
     C                   EXCEPT    HEADER
      *
     C     *INLR         IFEQ      '1'
     C                   EXCEPT    NOTFND
     C                   GOTO      EXITPG
     C                   ENDIF
      *
     C     K@FDEP        CHAIN     QADBFDEP                           LR
     C     *INLR         IFEQ      '1'
     C                   EXCEPT    NOLFS
     C                   GOTO      EXITPG
     C                   ENDIF
      *
      *
     C     *INLR         DOWEQ     '0'
      *
     C     K@XREF        CHAIN     QADBXREF                           99
     C     LFONLY        IFNE      '1'
     C     DBXATR        OREQ      'LF'
      *
      *     CHECK IF NEW PAGE NEEDED.
     C     LINE#         ADD       DBXNKF        NEWPAG            5 0
     C                   ADD       2             NEWPAG
     C     NEWPAG        IFGT      OVRFLW
     C                   EXCEPT    HEADER
     C                   ENDIF
      *
     C                   EXCEPT    LFHDR
     C     K@KFLD        CHAIN     ADBKFLD0                           98
     C     *IN98         DOWEQ     '0'
     C     K@IFLD        CHAIN     ADBIFLD0                           97
     C                   EXCEPT    LFDTL
     C     K@KFLD        READE     ADBKFLD0                               98
     C                   ENDDO
      *
     C                   ENDIF
      *
     C     K@FDEP        READE     QADBFDEP                               LR
     C                   ENDDO
      *
      *
     C     EXITPG        TAG
     C                   CLOSE     QSYSPRT
     C     PRINT         IFNE      '1'
     C                   CALL      'QCMDEXC'
     C                   PARM      DSPCMD        CMD             128
     C                   PARM      35            CMDLEN           15 5
     C                   CALL      'QCMDEXC'
     C                   PARM      DLTCMD        CMD             128
     C                   PARM      35            CMDLEN           15 5
     C                   ENDIF
     C                   RETURN
      *
      *
     OQSYSPRT   EF           HEADER         1  3
     O                                           52 'Find Logical File Report'
     OQSYSPRT   EF           HEADER         1
     O                       LIB               +  4
     O                       FILE              +  1
     O                       DBXTXT            +  2
      *
     OQSYSPRT   EF           NOTFND      2
     O                                         + 12 'FILE NOT FOUND'
      *
     OQSYSPRT   EF           NOLFS       2
     O                                         + 12 'NO LOGICAL FILES FOUND'
      *
     OQSYSPRT   EF           LFHDR       2  1
     O                       DBFLDP            +  2
     O                       DBFFDP            +  1
     O                       DBXATR            +  2
     O                       DBXTXT            +  2
     OQSYSPRT   EF           LFHDR          1
     O                       DASHLN            +  2
      *
     OQSYSPRT   EF           LFDTL          1
     O                       DBKFLD            + 12
     O                       DBITXT            +  2


Dig Deeper on IBM iSeries division news

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close