Page 1 of 1

Get DD Names from a Job.

Posted: Sun Oct 13, 2013 5:41 pm
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

Re: Get DD Names from a Job.

Posted: Sun Oct 13, 2013 6:46 pm
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.

Re: Get DD Names from a Job.

Posted: Wed Apr 02, 2014 12:55 am
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.

Re: Get DD Names from a Job.

Posted: Wed Apr 02, 2014 2:42 am
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.