View previous topic :: View next topic
|
Author |
Message |
Ashsih
New User
Joined: 20 Dec 2007 Posts: 29 Location: India
|
|
|
|
I have small query in JCL.
I have one proc let say DOEBXDD which defined as
//step1 EXEC PGM=SYNCSORT
//sortin DD XXX , DISP=SHR
//sortout DD YYY, DISP=SHR
The above proc is called by following JOB card
//JOB CARD
//STEP01 EXEC DOEBXDD
Now the file which i need to sort are created inside the ZZZ by it's predeccesor job and also the number of files created inside the ZZZ is a depend on Business logic( any nymber)
Let say on monday Sorting files are AAA.123 and AAA.231 are created inside the file ZZZ
On Tuesday Sorting files are AAA.133, AAA.432 and AAA.331 are created inside the file ZZZ
So how i can passed overide to the proc which are created inside the Files
In simple way i need to sort file which creted inside the onther file.
Let me know if it's possible by adding one more step before sorting. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
How many input files will DOEBXDD process? Will the "receiving" job run multiple times or just one time?
Quote: |
In simple way i need to sort file which creted inside the onther file.
|
I do not understand this. I do not know how a file is created inside another file. |
|
Back to top |
|
|
Ashsih
New User
Joined: 20 Dec 2007 Posts: 29 Location: India
|
|
|
|
The number of input files used for sorting are created inside the another file and number is depend on business logic.( may be any number of files)
Their is predecessor job in which one COBOL module execute which write the files which needs to sort in another file according to business logic.
As i can't add sorting in same module as the number of files are changes according to business logic. |
|
Back to top |
|
|
Ashsih
New User
Joined: 20 Dec 2007 Posts: 29 Location: India
|
|
|
|
The Sorting jobs DOEBXDD runs on daily basis |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
Quote: |
The number of input files used for sorting are created inside the another file and number is depend on business logic.( may be any number of files) |
What should one conclude from this, as asked earlier, what does this mean "file created inside another file"..I would suggest to post a scrap from the actual code (if it's too big) you are dealing with & what exactly do you want to do with the files.
And what is ZZZ, code posted so far talks about only XXX & YYY so far..
Hmmm..please start over again, nothing is clear (at least to me), what's the question.. |
|
Back to top |
|
|
Ashsih
New User
Joined: 20 Dec 2007 Posts: 29 Location: India
|
|
|
|
Anuj,
As YYY is o/p file so no issue of it.
About XXX , i want to replace that file by files which are created inside the ZZZ and then need to perform sort opertation.
Let say on Moday, as per business logic AAA.111, AAA.222 are written inside ZZZ file.
Now i want to Sort the file AAA.111, AAA.222 .
Let say on Tuesday, AAA.231, AAA.543. AAA234 are written inside ZZZ file and so on.
"file created inside another file" means i need to sort file which names are stored in onther file.
I know it's very hard to understand it. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
One easy to get what you need is to have a job read the file that contains the dataset names and generate the needed jcl. The generated jcl would then be submitted thru the internal reader.
If you are not familiar with the internal reader, use the forum SEARCH as there are multiple topics on the use of the internal reader. |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
I see at least 3 possibilities:
1) If the DSN file can be made in JCL syntax you can "include" it into your JCL
2) As Dick stated the JCL can be dynamically created. It could be submitted to the internal reader.
3) The files could be dynamically allocated by a custom program. |
|
Back to top |
|
|
Ashsih
New User
Joined: 20 Dec 2007 Posts: 29 Location: India
|
|
|
|
Hi Dick,
As of now job is submitted by internal reader and business want it to schedule in Controlm.
Douglas
Can u explain in more details option 3 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
As of now job is submitted by internal reader and business want it to schedule in Controlm. |
That shouldn't be a problem. Simply have the existing job create the needed jcl in the pds used for scheduling.
Have this "new" job (it would always have the same name) scheduled as a successor of the existing job (which already creates the needed jcl - if i understand your recent post). |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
What I din't like about all of this is these crazy changing dataset names every day.
In the past when things were simple, the datasets were always the same name, and after processing were written to a GDG backup and then nulled.
This way if files were not written to by a previous job there would always be at least a null dataset as input as from above process, and if they were written to - then the data gets processed.
What is this crazy fad with dataset names that change every day ???
Any clues most welcome |
|
Back to top |
|
|
Ashsih
New User
Joined: 20 Dec 2007 Posts: 29 Location: India
|
|
|
|
The naming convection is fixed only last qualifier of dataset changes as per business logic.
Like DOE.BKCY.*******
where last * are changes according to business. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
What is this crazy fad with dataset names that change every day ??? |
I see this largely when people who know very little about the mainframe and infrastructure discipline implement using names that seem to be more common in unix and win-based environments.
Quote: |
where last * are changes according to business. |
To me, this just says the capabilities of dataset management on the mainframe are not understood/followed. Any "business" requirement to name datasets this way is artificial - might have to be followed, but is not technically necessary. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
just piggy backing
/rant on
another thing that bothers me is the large number of questions
on how to set a return code to skip some processing when a dataset is empty
that' s one of the poorest application design approach I have seen
the safest approach would be for the program to execute succesfully
even if some/all the input datasets were empty
would make happy everybody, the people writing the jcl, the people submitting it, the automatic scheduler
and to analyze the jcl layout based on the restartable unit of work
splitting the logic always in three parts...
preprocessing ( setting up the restartability environment )
processing
abnormal condition handling
making as ususl happy lots of people and the scheduler
/rant off |
|
Back to top |
|
|
|