Get DD Names from a Job.

HLASM for MVS. PL/I for MVS & Enterprise PL/I for z/OS.
Post Reply
Anil
Registered Member
Posts: 70
Joined: Sun Jun 16, 2013 12:41 am

Get DD Names from a Job.

Post by Anil »

In a Job, I've I have a lot of DD names. I want to be able to read all the files in this Job without knowing what the dd-names are already. Is there anyway I can see using assembler what dd-names are included in the JCL. I know that all the dd-names start with HPDC so can easily distinguish them from any other dd-name in the job. One of my co-worker suggested to use RDJFCB but for that you need the DDNAME in advance!

I'm sure this can be done, but not getting way to start. Any help would be appreciated.

Thanks
Thanks,
Anil
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Get DD Names from a Job.

Post by Robert Sample »

If you go through the control blocks, you can get the DD names assigned -- but this is complex coding to make sure you are pulling out the right fields in the right blocks. Check the MVS DATA AREAS manuals if you really want to go this route.
Anil
Registered Member
Posts: 70
Joined: Sun Jun 16, 2013 12:41 am

Re: Get DD Names from a Job.

Post by Anil »

Hi Robert,

I tried to work with MVS DATA AREAS but it all seems to far away from my reach. Can you suggest a starter on this please.
Thanks,
Anil
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Get DD Names from a Job.

Post by Robert Sample »

You'll need to access the TCB (Task Control Block), TIOT (Task Input Output Table) and JFCB (Job File Control Block) in order to extract the data you want. I do not know of any tutorials on the control blocks -- but then, I haven't looked, either.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Assembler & PL/I.”