Page 2 of 2

Re: Passing 'Library Name' in job step

PostPosted: Wed Apr 23, 2014 5:10 pm
by Aki88
Ohh trust me Billy, I'd love to have a word with the guy who suggested this design...

Keeping that aside, what I am doing now is submitting the SORT step as a seperate job using IEBGENER immediately after the step in which the member containing SORTOUT is created; a small hurdle here though; my member name (I mean the member containing the SORTOUT and not the member containing the SORT JCL), is going to change on every run of the code generating the SORTOUT (this is because different member for different files; this is to facilitate multiple instances of the COBOL to run in parallel creating different o/p SORTOUTs).
Is there a way to pass a symbolic parameter through IEBGENER, which can then be used to resolve symbolics in the submitted (through IEBGENER) JCL.

Thanks again.

Re: Passing 'Library Name' in job step

PostPosted: Wed Apr 23, 2014 5:18 pm
by Aki88
NicC wrote:
how do we find the correct DSN later for this temp dataset

//THISSTEP DD DSN=&&TEMP,DISP=(,PASS)....
//NEXTSTEP DD DSN=&&TEMP,DISP=(OLD....)

LRECL (and other DCB parameters) do not need to be coded - your sort program takes care of that.


My bad, I didn't see your post Nicc, before writing the reply...
My understanding is &&TEMP is a temporary dataset; we need to resolve this into a DSN/File-Name which has been selected/generated by the previously executed COBOL (kindly refer first post, the DS name and other criteria are getting generated by a COBOL prog).
So, how do we resolve the 'names' here; if we are using a TEMP dataset; we need to add a deciding criteria which allocates a DS with the name that was generated by COBOL.

Thanks.

Re: Passing 'Library Name' in job step

PostPosted: Wed Apr 23, 2014 5:44 pm
by Aki88
@Billy; sorry for asking that redundant question on IEBGENER; just looked up the 'fine manual'; lemme do a bit of ground work again; if I get stuck with this one, will come back.....

Thanks a ton though...

Re: Passing 'Library Name' in job step

PostPosted: Wed Apr 23, 2014 5:49 pm
by BillyBoyo
You mean you are using the INTRDR? Doesn't have to be IEBGENER that does that.

If your have an output DSN from the COBOL program that contains the required SORTOUT, just forget the member stuff, and concatenate that DSN as your input to the copy-to-INTRDR step.

If you have multiple steps, you may have to arrange insertion at some point.

If you show your output from IEBGENER and output from the COBOL program, it should be possible to get something simple working.

The problem with multiple invocations presumably is inherent in the original (non-)design. Since it won't work, it is difficult to understand how it was suggested that it should operate, so we need to see the detail.

OK. I see when I try to post this you are doing some work on it, but I'll leave this anyway.

Re: Passing 'Library Name' in job step

PostPosted: Fri Apr 25, 2014 8:54 pm
by Aki88
Okies; I was able to get something worked out here; instead of going through the drill of submitting a job to INTRDR or having a seperate step consisting of SORT, I re-designed the sloppy process a teensy-weensy bit, to get the job done without much rework.

Have modified the COBOL which was generating the original SORTOUT data, to create and subsequently submit the SORT step to SPOOL; this would remove the need for seperate JCL/Parm Member/TWS schedule/IEBGENER job for INTRDR submission/and a horde of other crap, which was an unnecessary addition in the original design; and this makes my code reusable with minimal changes in future (in case new file names are to be added in SORTOUT).

Stuck at one point now, the part where we build this JCL was piece of cake; the part which has to submit the job, is where am stuck now.

Query: is it possible to submit a JCL to SPOOL from a batch COBOL program? <Through CICS, yup, that is something I am aware of and have done quite a few times before; through batch, have never tried this one, and unfortunately don't have access to run this code at this moment, travelling over a long weekend :( >

Has anyone tried this before??? A peek at the syntax would be really helpful.
I don't think we can use a EXEC CICS SPOOL%%%% format with this one; have never done it before hence skeptical.

If this li'l piece gets working, I can call it a day.

Thanks.

Re: Passing 'Library Name' in job step

PostPosted: Sat Apr 26, 2014 1:29 am
by NicC
I believe numerous examples exist within the forum - simply write you data to a DDNAME that is assigned to INTRDR. And if it is production it will still have to be made known to TWS so that it can keep an eye on it and release any dependent jobs.

[Edit}Or you could write it to a dataset and have the next step execute IKJEFT01 to submit the dataset. But TWS should still have to know about it.

Re: Passing 'Library Name' in job step

PostPosted: Sat Apr 26, 2014 3:44 am
by Aki88
Hey Nicc,

I'd be damned; silly of me to have missed that :o :oops: Now I know, I definitely need a vacation!

Thanks for that one, put my nose in the right direction; will forward this one to the team as I don't have access to MF at the moment, and we can all finally lay this requirement to rest.

Thanks, and have a great weekend ahead.