Skip to content

Downloaded members may receive wrong extension #4250

@adam-wolfe

Description

@adam-wolfe

Describe the bug

If I have a PDS named ADAM.TEST.JCL that contains a member named CBLTEST (to CLG some program for example), then try to save all members or save just the CBLTEST member, the downloaded member will be given a .cbl extension. This differs from how the member is opened by Zowe Explorer (which correctly assignes the .jcl extension).

It appears that the member name is being factored into how the extension is being assigned when we should be relying on the name of the PDS.

To Reproduce

  1. Find a PDS that clearly contains a certain kind of data (JCL, COBOL, REXX, etc.).
  2. Within that PDS, ensure that there are members whose names indicate some other data type. Types are inferred based on this logic:
    export const DS_EXTENSION_MAP: Map<string, (string | RegExp)[]> = new Map([
    [".c", ["C"]],
    [".jcl", ["JCL", "JCLLIB", "CNTL", "PROC", "PROCLIB"]],
    [".cbl", ["COBOL", "CBL", "COB", "SCBL"]],
    [".cpy", ["COPYBOOK", "COPY", "CPY", "COBCOPY"]],
    [".inc", ["INC", "INCLUDE", "PLINC"]],
    [".pli", ["PLI", "PL1", "PLX", "PCX"]],
    [".sh", ["SH", "SHELL"]],
    [".rexx", ["REXX", "REXEC", "EXEC"]],
    [".xml", ["XML"]],
    [".asm", ["ASM", /ASSEMBL/]],
    [".log", ["LOG", /SPFLOG/]],
    ]);
  3. Download all members
  4. Notice that extensions are not consistent among the downloaded members

Expected behavior

We should only be basing the extension on the DSN and not the member name, e.g., if I download all members from ADAM.TEST.JCL, every downloaded member should be given the .jcl extension.

Screenshots

Desktop (please complete the following information):

  • OS:
  • Zowe Explorer Version: 3.5.0
  • (Optional) Zowe CLI Version:
  • (Optional) Do you have secure credentials enabled?
  • (Optional) Are you using a custom credential manager?

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-mediumNot functioning - next quarter if capacity permitsseverity-lowBug that makes the usage of the Zowe less convenient but doesn't impact key use cases

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions