I am creating a macro which has to use the Dataset name in which the macro will run. How to get the name of the this current dataset which is opened in ISPF that I cannot hardcode during run time inside my code.
Example: I open a Dataset say ABC.XYZ.LMN. i have to run my macro to find a string inside this dataset. Is there a way I can get this dataset name inside my macro to use it for further use. Say I need to open a another dataset inside this macro ( ABC.XYZ.LMN.NAME ) which is a sub group of ABC.XYZ.LMN and i have to find the same string.
If I get the current dataset name in which my macro will run. I can form the other dataset name by simply concatnating it with just the last qualifier '.NAME'
Is there a ISPF command that can be used to do this step?