Skip to Main Content
IBM Z Software


This portal is to open public enhancement requests against IBM Z Software products. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Delivered
Workspace PL/I Compilers
Created by Guest
Created on Dec 11, 2015

Built-in Support for PDS Processing

Currently, in order to read all members of a PDS it's necessary to first read the directory and create an array of member names, then either use an Assembler program to read each member or from PL/I dynamically allocate each fully qualified member, open the dataset, read each record from the member, then close the dataset and repeat for each member.

I'd like to see a better built-in method for processing PDS/PDSE's.

My thought is this:

DCL MYFILE FILE OUTPUT RECORD PARTITIONED; /* PARTITIONED ? New attribute available for read/write/update, the DD in the JCL/CLIST/REXX would NOT have a member name specified, just the PDS name */

ON ENDPDS(MYFILE) /* ENDPDS ? New BUILTIN function)
BEGIN;
EOPDS_MYFILE = ON;
END;

ON ENDMEMBER(MYFILE) /* ENDMEMBER ? New BUILTIN function)
BEGIN;
EOM_MYFILE = ON;
END:

OPEN FILE(MYFILE);

POSITION FILE(MYFILE) MEMBER(); /* POSITION ? New PL/I statement, MEMBER with an optional parameter for member name ? if set, point to the member specified, otherwise point to the first/next member */
DO WHILE(^EOPDS_MYFILE);
MEMBER_NAME = GETMEMBERNAME(MYFILE); /* GETMEMBERNAME ? new BUILTIN function */
EOF_MYFILE = OFF;
RECORDS_READ = 0;
READ FILE(MYFILE) INTO(RECORD_BUFFER);
DO WHILE(^EOM_MYFILE);
RECORDS_READ = RECORDS_READ + 1
READ FILE(MYFILE) INTO(RECORD_BUFFER);
END;
PUT SKIP LIST(?RECORDS READ FROM ?,MEMBER_NAME, ? = ',RECORDS_READ);
MEMBERS_PROCESSED = MEMBERS_PROCESSED + 1;
POSITION FILE(MYFILE) MEMBER();
END;

CLOSE FILE(MYFILE)

PUT SKIP LIST(?MEMBERS PROCESSED IN MYFILE = ', MEMBERS_PROCESSED)

Sample for one member named TEST:

OPEN FILE(MYFILE);

POSITION FILE(MYFILE) MEMBER('TEST');
DO WHILE(^EOPDS_MYFILE);
READ FILE(MYFILE) INTO(RECORD BUFFER);
DO WHILE(^EOM_MYFILE);
RECORDS_READ = RECORDS_READ + 1
READ FILE(MYFILE) INTO(RECORD BUFFER);
END;
PUT SKIP LIST(?RECORDS READ =',RECORDS_READ);
END;

CLOSE FILE(MYFILE)

I don't know if it's possible, but if so all of this would be done without opening and closing the dataset between members for super fast I/O.

Idea priority Medium
  • Guest
    Reply
    |
    Apr 29, 2020

    Rather than delivering this via a built-in, we added a program to the 5.3 samples directory that finds all the member names in a PDS(E). There are other RFEs that requiest the ability to specify a member name and dataset to be opened. We are still planning to deliver the updates needed for those RFEs

  • Guest
    Reply
    |
    Aug 17, 2018

    We're going to start this out by providing a built-in function that will provide the count and names of all the members of the PDS(E)'s associated with a DDNAME

  • Guest
    Reply
    |
    Jan 19, 2016

    This is a good idea.

  • Guest
    Reply
    |
    Jan 4, 2016

    To read, create or update a member of a PDS or LIBRARY we need assembler routines for ENQ/DEQ on a member level, because dynamic allocation only covers ENQ/DEQ on the dataset level.

    Thus we would like to have ENQ/DEQ on member level in PL/I as well in addition to benefit from any enhancement for the member processing in PL/I.