ADDRESS ISPEXEC "LMDINIT LISTID(DTPDS) LEVEL("PKGNM")"
ADDRESS ISPEXEC "LMDLIST LISTID("DTPDS") OPTION(TOTALS)"
/*IF RC < 8 THEN DO
SAY 'NO. OF DATASETS IN THE LIST IS ' ZDLDST
END */
DO WHILE RC < 8
ADDRESS ISPEXEC "LMDLIST LISTID("DTPDS") DATASET("DS") OPTION(LIST)"
SAY 'DATASET NAME ' DS RC
END
ADDRESS ISPEXEC "LMDLIST LISTID("DTPDS") OPTION(FREE)"
ADDRESS ISPEXEC "LMDFREE LISTID("DTPDS")"
SAY ' '
ADDRESS ISPEXEC "LMDLIST LISTID("DTPDS") OPTION(TOTALS)"
/*IF RC < 8 THEN DO
SAY 'NO. OF DATASETS IN THE LIST IS ' ZDLDST
END */
DO WHILE RC < 8
ADDRESS ISPEXEC "LMDLIST LISTID("DTPDS") DATASET("DS") OPTION(LIST)"
SAY 'DATASET NAME ' DS RC
END
ADDRESS ISPEXEC "LMDLIST LISTID("DTPDS") OPTION(FREE)"
ADDRESS ISPEXEC "LMDFREE LISTID("DTPDS")"
SAY ' '
LMDLIST seems to work fine only for the first element it retrieves. After that i am getting following error:
. . . . . . . . . . . . . . . . . . . . . . . . . . .
ISPF Dialog Error
Command ===>
More: +
******************************************************************************
* ISPS108 *
* *
* Invalid length *
* Parameter 'DATASET' exceeds the allowable length. *
* *
* *
* *
* *
* *
* *
* Current dialog statement: *
* LMDLIST LISTID(ISR00023) DATASET(CMN.Y2KS.#004950.AS2) OPTION(LIST) *
* *
* Enter HELP command for further information regarding this error. *
* Press ENTER key to terminate the dialog. *
* *
* *
* *
* *
ISPF Dialog Error
Command ===>
More: +
******************************************************************************
* ISPS108 *
* *
* Invalid length *
* Parameter 'DATASET' exceeds the allowable length. *
* *
* *
* *
* *
* *
* *
* Current dialog statement: *
* LMDLIST LISTID(ISR00023) DATASET(CMN.Y2KS.#004950.AS2) OPTION(LIST) *
* *
* Enter HELP command for further information regarding this error. *
* Press ENTER key to terminate the dialog. *
* *
* *
* *
* *
I am unable to diagnose the "Invalid length" error. As per the services guide
LIST When you use the LMDLIST LIST option for the first time, the LMDLIST service generates an internal list. If you initialize the dataset-var to blanks, the first name in the internal list is returned. If you set the dataset-var to a data set name, that data set name is returned in dataset-var. If the LMDLIST service does not find the named data set the next data set in the list is returned. Each time you use the LMDLIST service with the LIST option it returns the next name from the internal list until it reaches the end of data. The LMDLIST service only includes the data set names meeting the criteria
As per this, code should fetch me the next dataset. Also, when i tried to initialize the DS to spaces at the beginning of my code (i.e. before LMDINIT) i ran into another error
ISPF Dialog Error
Command ===>
******************************************************************************
* ISRLD016 *
* *
* Data set not specified *
* The data set parameter is required for the list option. *
* *
* *
* *
* *
* *
* *
* Current dialog statement: *
* LMDLIST LISTID(ISR00024) DATASET( ) OPTION(LIST) *
* *
* Enter HELP command for further information regarding this error. *
* Press ENTER key to terminate the dialog. *
* *
* *
* *
* *
******************************************************************************
Command ===>
******************************************************************************
* ISRLD016 *
* *
* Data set not specified *
* The data set parameter is required for the list option. *
* *
* *
* *
* *
* *
* *
* Current dialog statement: *
* LMDLIST LISTID(ISR00024) DATASET( ) OPTION(LIST) *
* *
* Enter HELP command for further information regarding this error. *
* Press ENTER key to terminate the dialog. *
* *
* *
* *
* *
******************************************************************************
Any suggestion or pointers in right direction will be much appreciated.
Thank you,
AB.