Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Passing Overrides to PROC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ashsih

New User


Joined: 20 Dec 2007
Posts: 29
Location: India

PostPosted: Mon May 19, 2008 10:45 am    Post subject: Passing Overrides to PROC
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon May 19, 2008 10:58 am    Post subject:
Reply with quote

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
View user's profile Send private message
Ashsih

New User


Joined: 20 Dec 2007
Posts: 29
Location: India

PostPosted: Mon May 19, 2008 11:32 am    Post subject:
Reply with 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)

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
View user's profile Send private message
Ashsih

New User


Joined: 20 Dec 2007
Posts: 29
Location: India

PostPosted: Mon May 19, 2008 11:35 am    Post subject: Reply to: Passing Overrides to PROC
Reply with quote

The Sorting jobs DOEBXDD runs on daily basis
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon May 19, 2008 1:23 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Ashsih

New User


Joined: 20 Dec 2007
Posts: 29
Location: India

PostPosted: Mon May 19, 2008 2:22 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon May 19, 2008 9:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Mon May 19, 2008 10:40 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Ashsih

New User


Joined: 20 Dec 2007
Posts: 29
Location: India

PostPosted: Tue May 20, 2008 10:58 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 20, 2008 11:03 am    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue May 20, 2008 11:26 am    Post subject:
Reply with quote

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 icon_confused.gif
Back to top
View user's profile Send private message
Ashsih

New User


Joined: 20 Dec 2007
Posts: 29
Location: India

PostPosted: Tue May 20, 2008 11:40 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 20, 2008 7:26 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Tue May 20, 2008 7:37 pm    Post subject: Reply to: Passing Overrides to PROC
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX to view the PGM or PROC jackzhang75 CLIST & REXX 11 Tue Jun 20, 2017 1:20 am
No new posts Jcl pram vs proc parms ashek15 JCL & VSAM 3 Thu Mar 30, 2017 6:50 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts Passing information through JCL as in... Pia Baruah JCL & VSAM 5 Wed May 25, 2016 2:22 pm
No new posts New PROC not reflecting in prod even ... Musab Ahmed CA Products 9 Tue Mar 15, 2016 12:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us