IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Passing Overrides to PROC


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Mon May 19, 2008 10:58 am
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
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
Reply with quote

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

Superior Member


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

PostPosted: Mon May 19, 2008 1:23 pm
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
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

Moderator Emeritus


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

PostPosted: Mon May 19, 2008 9:13 pm
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
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
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

Moderator Emeritus


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

PostPosted: Tue May 20, 2008 11:03 am
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: 8797
Location: Welsh Wales

PostPosted: Tue May 20, 2008 11:26 am
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
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

Moderator Emeritus


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

PostPosted: Tue May 20, 2008 7:26 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue May 20, 2008 7:37 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Passing SYSPRINT to Invoked Program PL/I & Assembler 9
No new posts Passing parm from JCL to Assembler, b... PL/I & Assembler 2
No new posts passing symbolic parameters through d... JCL & VSAM 3
No new posts passing stem variable with VPUT/VGET ... CLIST & REXX 6
Search our Forums:

Back to Top