Hi all,
In a raquirement. I need to copy data from PS file to a JCL.
The complete scenario is as below,
In Step 1 , I am having GDG base and searching for some specific text in the versions of that GDG, and required version name i will be getting in PS file.
Now i need to use that version name in step 2. I repeat I need to have version name which is inside the PS file in jcl step DD.
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
The version will almost certainly always be 00.
/RANT ON
When talking about GDS it is important to use the correct terminology, as both version and generation are both valid in terms of a GDS.
It is a well known fact that only one version of a GDS may exist at any one time, however, multiple generations may exist together.
Please learn and use the correct terminology when posting, as using the wrong term can cause confusion and possibly delay a resolution to your problem
/RANT OFF
How do you plan to allocate the rquired GENERATION of the GDS once you have found out which it is, because once the JCL has been interpreted by JES it is set in stone.
Hi expat and all,
I apologise for my mistake. and correcting my requirement.
The complete scenario is as below,
In Step 1 , I am having GDG base and searching for some specific text in the generations of that GDG, and required generations name i will be getting in PS file.
Now i need to use that generation name in step 2. I repeat I need to have generation name which is inside the PS file in jcl step DD.
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
OK, so which program / utility will you use to find out which generation has the desired data held within.
And having established which generation(s) contain this data, how do you propose to allocate them to the program that will process them.
This type of question has been asked quite a few times already, and some of the suggestions are to ............
1) Use INTRDR to submit a second job built by the first
2) Build an include member and submit a second job
3) Use of the scheduler package with option (2) above instead of INTRDR
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
Quote:
In Step 1 , I am having GDG base and searching for some specific text in the generations of that GDG, and required generations name i will be getting in PS file.
Now i need to use that generation name in step 2. I repeat I need to have generation name which is inside the PS file in jcl step DD.
How i can do this. Please help me in this regard.
This absolutely, categorically cannot be done. Period. Because once the job is submitted, and JES goes through the converter / interpreter phase, the JCL is fixed -- as you were told already -- and cannot be modified in any way. You must submit another job to include dynamic elements -- because the JCL for the running job cannot be changed.
Either accept that you need a second job, or go back to whoever gave you the assignment and tell them that this method is not possible and therefore the assignment cannot be completed as required.
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
Robert Sample wrote:
or go back to whoever gave you the assignment and tell them that this method is not possible and therefore the assignment cannot be completed as required.
Hi Peter,
I have agreed with Robert about the point that second job is needed here. but in my case i m writting datsetname in PS file by internal reader. so it is difficult to submit again one job through internal reader within same job and quite complex also.
Now i m including the PS file in the job so that i can use dataset name which is inside the PS file.
I am a software engineer and not suppose to say no for any work because of technical difficulties. Its my job to provide solutions.
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
Quote:
I am a software engineer and not suppose to say no for any work because of technical difficulties. Its my job to provide solutions.
What utter idiocy. If you are a software engineer, it is your job to point out things that either cannot be done at all or cannot practically be done. If you're not doing this, you're not a software engineer, you're a clown masquerading as a software engineer. Further, a software engineer will allow the goal to be dictated but not the method -- you should always be able to specify how you're going to do the requested work (as long as your method meets the site requirements).
I had a manager one time ask me if a complicated request could be done. I came back to him with a complete system proposal showing what he wanted to do could be done at a cost of $9 million. Since his budget at the time was less than $2 million, he decided to take my recommendations and get almost what he wanted for a lot less money.
@Robert,
kindly read my wordings again. i have used word "technical difficulties". and the example u have given is a finential constrain which u cant solve at all.
Secondly,
In my assignment I have prepared the design and now in implementation part, solving out technical difficulties for reaching my goal.
as i know this is the right way of working because if technical difficulties come we use our knowledge and experience to solve it out rather then going back to say "It cant be done". I dont prefer to give up this much easily.
Quote:
you're a clown masquerading as a software engineer
@all : Please dont take me wrong. I am just doing my assignment, I dont want to waste ur time,but if some one will question my entity then i have to answer.
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
Quote:
so it is difficult to submit again one job through internal reader within same job and quite complex also
Where is the complexity?
It is rather straightforward to generate a JOB and subsequent EXEC and DD statements to run any number of steps in the generated process. Writing to the internal reader is only a matter of changing the DD statement in the generating job.
If you explain the actual requirement someone would be able to offer more usable suggestions.
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
Hi,
If you could put down your code here and let us know how much you have progressed. (A part of the JCL would be helpful) with some explanations to the steps. Then Im sure many will be able to help u a lot easier.
Hi dick scherrer and vasanthz,
Here is my complete requirement.
In my team, we are having a series of jobs which we need to submit for getting our work done. In these jobs we are having two kind of input :
1. Output from the previous job.
2. Other supportive input file(In Most cases GDG generations). : These files will be having a date at the top of the file which should be same for all the files being used in a job.
My manager asked me to write one job which will submit all the jobs and we should only need to give input to first job.
My Analysis:
I have thought for writing a job which will be having all the above jobs in job steps. Now for getting output of previous step in next step i can use referback. but for identifying the correct GDG generation(dependind upon date field) I have written a proc which will take GDG base and date as input, and will give the GDG generation name in as PS file, depending upon date field.
now i need to do two task symultaniously. I need to call the proc for getting correct GDG generation, before the step being used them. And use the PS file having generation name in the step for executing job step using GDG generations. for this thing i m trying for passing symbolic parameter while calling the proc for generating the PS name dynamically. so that the PS should be unique for each step.
for using the PS file containg GDG generations in job step, i m including that PS file in my Job step, after calling proc which will give required GDG generation.
My progress :
I have done with the proc getting the GDG generations in PS file depending upon the Date field.
Right now i m trying to get unique DD name for writting GDG generations as DD steps in PS file so that i can easily use them in jcl step which using those GDG generations, here including the PS file in jcl will be enough for getting the GDG generations in JCL.
for writting the unique DD name at run time i have used SEQNUM, and it is giving the number which is unpredicatable(Because required GDG generation may be at any place in all GDG generation) . so i cant use SEQNUM for this purpose.here is the code using SEQNUM :
OUTREC=(C'//C',SEQNUM,3,ZD,C'CNTL DD *',/,
C' INCLUDE COND=(1,08,CH,EQ,C''',
C'12/14/09',C'''',C')',/,
C' OUTFIL FNAMES=OUT,',/,
C' OUTREC=(C',
C'''',
C'FILE',
SEQNUM,3,ZD,
C' DD DISP=SHR,',
C'''',C',',/,
C' C',
C'''',
C'DSN=',
17,44,
C'''',
C',11X',
C')',14X)
here in FILE001, 001 is getting generated by SEQNUM.
Please let me know any other way of getting unique DD name which i can pass or predict while writting the jcl.
One way i can think about passing dd name as a symbolic parameter in OUTREC, but unable to do it.
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
Suggest you post some particular data (control info like dataset names as well as some sample data - very little actual data should be needed).
At this point i'm not sure why symbolic(s) would be needed. If you generate the "to be submitted" jcl and control statements, i believe you can generate what is needed and not have to further substitute values.
If you were to set one up by hand what would you eventually submit?
The better "picture" you can show us, the more we may be able to help.
Trying a solution with SORT certainly seems a whole lot more complicated than just writing a short Rexx program that reads the data and writes JCL to a temp file and submits it. Is there a reason you don't want to write a program? This couldn't be more than 20 or 30 lines of code plus templates for the JCL. I really don't understand why this is a multi-step process. A single short program can do it all in one step.
If you are planning to use JCL referback in the same job, that won't work. As Robert said, you need all the data set names resolved when the job is submitted. You have nothing to refer back to.
Actually, I don't really see the need to have an intermediate file that contains dates either, but I have to admit that I'm confused by the description because the terminology is confusing (calling procs, dd steps, etc). Dick is right though. A complete (minimal) input and output example is needed.