JCL- dynamic unloads



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

JCL- dynamic unloads

Postby dingdong » Tue Jun 29, 2010 11:28 am

Hi All ,

Can you please help me design a loagic using COBOL and JCL where I can make dynamic unload JCLs .So that I can read a dataset having list of many db2 tables and then extract the unload of each of those tables in separate data sets.
An internal reader needs to be used . The correson ding table spaces can be extracted from sys ibm tables but how do I pass it dynamically t the jcl each time ?
dingdong
 
Posts: 4
Joined: Tue Jun 29, 2010 11:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: JCL- dynamic unloads

 

Re: JCL- dynamic unloads

Postby expat » Tue Jun 29, 2010 11:58 am

I would consider using ISPF file tailoring services. It builds JCL very effectively.
expat
 
Posts: 382
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 1 time

Re: JCL- dynamic unloads

Postby dingdong » Tue Jun 29, 2010 1:53 pm

Yes by ISPF tailoring services ... but the point that has to be considered is that the input file may contain any number of table names in the input file ... For each table the unload has to be generated .The table space will have to be determined for each table and then the unload has to be taken .. but can anyone suggest the best way to keep unloads of tables as the input list could be dynamic
dingdong
 
Posts: 4
Joined: Tue Jun 29, 2010 11:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: JCL- dynamic unloads

Postby enrico-sorichetti » Tue Jun 29, 2010 2:19 pm

looks like You want to do something You have not the slightest understanding about,
and ask us to so the work for You
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: JCL- dynamic unloads

Postby dingdong » Tue Jun 29, 2010 2:29 pm

I disagree.

The situation is like this ...
I will have a input file having list of table names at the end of every day .The number of table names can change everyday .
The requirement is that the unload of each of these tables have to be taken .
hence a cobol program (CBL1) has to be written where each table name is read ,then the details of the same have to be used for constructing a JCL to take unload of each table .So the output of CBL1 should be the JCL for taking unload

Now a new JCL has to be trigerred so that this output of CB1 can be used as a input and the output result of unloading can be captured .
Hope it is clear now
dingdong
 
Posts: 4
Joined: Tue Jun 29, 2010 11:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: JCL- dynamic unloads

Postby enrico-sorichetti » Tue Jun 29, 2010 2:58 pm

You might disagree...
but this is a help forum, not a do it for me one...

show what You have done and where You are facing issues
and somebody will be glad to help You

it would be more productive to do it using REXX
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: JCL- dynamic unloads

Postby enrico-sorichetti » Tue Jun 29, 2010 3:12 pm

but the point that has to be considered is that the input file may contain any number of table names in the input file

if You had some ISPF knowledge You would know that is not an issue

/pseudocode on
... some initiation housekeeping
FTOPEN
FTINCLUDE JOBSTART skel
do forever
    read the input table name
    if end of file then leave the loop
    retrieve the info on the table name and build the proper tokens
    FTINCLUDE STEP skel
    set a flag to indicate that at least one step was built
end
FTINCLUDE JOBEND skel
FTCLOSE
if at least one step was built then  submit the jcl You have just built
... some termination housekeeping


the longest time would be to determine and build the proper skel layout
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: JCL- dynamic unloads

Postby enrico-sorichetti » Tue Jun 29, 2010 3:15 pm

cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: JCL- dynamic unloads

Postby dingdong » Tue Jun 29, 2010 4:02 pm

Well ...some more points I want to put . I dont want to process it 1 table at a time ... I want to build(from a COBOL program run by JCL1) a unload JCL(JCL2) having as many steps as the number of tables (for each table name ) .So each step must have the table name read from the file for taking unload which must be passed from the cobol program to the JCL2 being built .therefore a 25 step JCL must be built if 25 names are there in the table .

The things that need to be parameterised are the table names and also the names of the output files . Also a new step needs to be introduced in the JCL 1 to run the JCL2 in output file of step 1.
dingdong
 
Posts: 4
Joined: Tue Jun 29, 2010 11:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: JCL- dynamic unloads

Postby enrico-sorichetti » Tue Jun 29, 2010 4:26 pm

I am just wasting time trying to give good advice to somebody who cannot even read and understand the suggestions given.

my pseudo logic does just that... build ONE job with as many steps as the tables to be unloaded
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post