/* DL  Invoke Data List with Customized Prefixes  10/20/1993-12/21/1998
/* --------------------------------------------------------------------
/* Copyright (C) 1993-1998 by Vladimir Veytsel            www.davar.net

   PROC 1 R  /* Data set name prefix abbreviation or actual prefix or:
             /* '?'  - Display list of preset DSN prefix abbreviations
             /*        (Equivalent: '/')

   CONTROL NOCAPS
/* CONTROL NOCAPS,SYMLIST,CONLIST,LIST,MSG

/* Display List of Preset DSN Prefix Abbreviations --------------------

   IF ((&STR(&R)=&STR(?)| +
       (&STR(&R)=&STR(/)) +
      THEN DO
              ISPEXEC VIEW DATASET(PGMR.CLIST(DL)) MACRO(LISTPRF)
              EXIT
           END

/* Set Requested Name Prefix by Specified Abbreviation ----------------

   SELECT (&STR(&R))
          WHEN (&STR(*)) SET Prefix=&SYSUID
          WHEN (8)       SET Prefix=&SYSUID
          WHEN (P)       SET Prefix=&SYSUID..PGMR
          WHEN (U)       SET Prefix=&SYSUID..USER

          WHEN (1)       SET Prefix=SYS1      /* System
          WHEN (2)       SET Prefix=SYS2
          WHEN (3)       SET Prefix=SYS3
                                              /* Programmers
          WHEN (FH)      SET Prefix=DEVFRAN   /* Frank  H
          WHEN (KI)      SET Prefix=DEVKARN   /* Karen  I
          WHEN (VV)      SET Prefix=DEVVICT   /* Victor V

          WHEN (K)       SET Prefix=TEST.S.K  /* Client
          WHEN (L)       SET Prefix=TEST.S.L
          WHEN (M)       SET Prefix=TEST.S.M

          OTHERWISE   IF (&DATATYPE(&STR(&R))=NUM) +
                         /* ChangeMan package CHGMAN.PACK.#nnnnnn */+
                         THEN SET Prefix=&STR(CHGMAN.PACK.#+
                                              &SUBSTR(&LENGTH(&R):+
                                              &LENGTH(&R)+5,+
                                              &STR(00000)&R))
                         ELSE SET Prefix=&STR(&R)  /* Any other prefix
   END

   IF (&STR(&Prefix)^=) +
      THEN DO
              ISPEXEC VGET (ZDLDSNLV) PROFILE
              SET SaveDSNLV=&STR(&ZDLDSNLV)  /* Save original DSN pref
              SET ZDLDSNLV=&STR(&Prefix)     /* Set specified DSN pref
              ISPEXEC VPUT (ZDLDSNLV) PROFILE
           END

   ISPEXEC CONTROL NONDISPL ENTER            /* Skip prefix entry panel
   ISPEXEC SELECT PGM(ISRUDL) PARM(ISRUDLP)  /* Call Data List utility

   IF (&STR(&SaveDSNLV)^=) +
      THEN DO
              SET ZDLDSNLV=&STR(&SaveDSNLV)  /* Restore original DSN prf
              ISPEXEC VPUT (ZDLDSNLV) PROFILE
           END
