Passing 'Library Name' in job step



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: Passing 'Library Name' in job step

Postby Aki88 » Wed Apr 23, 2014 5:10 pm

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.
Aki88
 
Posts: 371
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 35 times

Re: Re: Passing 'Library Name' in job step

 

Re: Passing 'Library Name' in job step

Postby Aki88 » Wed Apr 23, 2014 5:18 pm

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.
Aki88
 
Posts: 371
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 35 times

Re: Passing 'Library Name' in job step

Postby Aki88 » Wed Apr 23, 2014 5:44 pm

@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...
Aki88
 
Posts: 371
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 35 times

Re: Passing 'Library Name' in job step

Postby BillyBoyo » Wed Apr 23, 2014 5:49 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Passing 'Library Name' in job step

Postby Aki88 » Fri Apr 25, 2014 8:54 pm

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.
Aki88
 
Posts: 371
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 35 times

Re: Passing 'Library Name' in job step

Postby NicC » Sat Apr 26, 2014 1:29 am

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Passing 'Library Name' in job step

Postby Aki88 » Sat Apr 26, 2014 3:44 am

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.
Aki88
 
Posts: 371
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 35 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post