View previous topic :: View next topic |
Author |
Message |
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Mon Nov 11, 2013 3:37 am Post subject: CLOB to be filled with JCL from a member of a PDS using load |
|
|
Hi, can somebody guide me how to store in an easy way JCL in a DB2 -CLOB? The general idea is to use this in a CICS environment where a program is writing this JCL after filling in some parms into the internal reader, scheduling a job. The customer does not want me to use a tdqueue. The architect says that it is very easy to load a member of a partioned dataset with JCL into a CLOB without anything special, just a load procedure, something like that but he didn't have an example. I tried to find something on the internet, was not succesful so I am asking the experts here.
Thanks in advance for some clues.
Regards,
Crox |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Mon Nov 11, 2013 10:54 am Post subject: |
|
|
Crox,
It is NOT clear as to what you are trying to do.
1. Do you have CLOB object in a table and you want to store that in a PDS as a member?
2. Do you have a CLOB object as member of a PDS and you want to load it into a DB2 Table?
Kolusu |
|
Back to top |
|
|
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Mon Nov 11, 2013 11:38 am Post subject: |
|
|
Hi Kolusu,
What my architect wants me to do is to store a JCL member into a CLOB column of a DB2 tabel, using only standard utilities.
He said it would be easy....
I didn't find it yet.
Regards,
Crox |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Mon Nov 11, 2013 11:51 am Post subject: |
|
|
Crox wrote: | Hi Kolusu,
What my architect wants me to do is to store a JCL member into a CLOB column of a DB2 tabel, using only standard utilities.
He said it would be easy....
I didn't find it yet.
Regards,
Crox |
Crox,
This adds more confusion. Lets your say Db2 table has 100 rows, now do you want to Update the CLOB column that table to have JCL member??
I am guessing that your architect want a JCL which when submitted would store(aka Load Utility) a CLOB object into a DB2 table and not the JCL statements into a Clob object. |
|
Back to top |
|
|
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Wed Nov 13, 2013 10:57 am Post subject: |
|
|
Code: | _________
/ /
( JCL (
\________\
|
|
/^\
/ \
/ SORT? \
<ÄÄÄÄÄÄÄÄÄÄÄ>
\ /
\ /
.
|
|
_________
/ /
( 2DBLOAD(
\________\
|
|
ÚÄÄÄÄÄÄÄÄ¿
³ ³
³ DBLOAD ³
³ ³
ÀÄÄÄÄÄÄÄÄÙ
|
|
________
(________)
³ ³
³db2table³
(________) |
INPUT: JCL skeleton so say 1000 times 80 bytes concatenated inside the CLOB.
OUTPUT: loadable file to fill a CLOB in DB2 containing in one stream the complete JCL skeleton for that job (if that is possible)
I assume that some utility can help to fill the dbload, here presented as SORT. |
|
Back to top |
|
|
William Collins Supermod
Joined: 03 Jun 2012 Posts: 437 Topics: 0
|
Posted: Wed Nov 13, 2013 11:12 am Post subject: |
|
|
You have a bunch of JCL statements you want to stick into DB2 as a bunch of stuff in a CLOB.
Or, you have a bunch of stuff you want to stick into DB2 as a bunch of stuff in a CLOB?
Or you want to know how to load a bunch of stuff into a CLOB with a DB2 utility, which stuff happens to be a number of FB, LRECL 80 records of data. |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Wed Nov 13, 2013 2:55 pm Post subject: |
|
|
Why is there a reason to use a CLOB
This is not the requirement (imho) but a way to providing what actually is the requirement.
There are many thousand bits of code thatstore JCL in a database for later execution that do not use a CLOB.
As you should be able to guess - we do not yet understand what is actually the requirement. _________________ All the best,
di |
|
Back to top |
|
|
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Thu Nov 14, 2013 4:28 pm Post subject: |
|
|
i didn't explain myself good enough. Not so much time.
1) I will have a CICS transaction running. It has to create a job by writing JCL into the internal reader.
2) to create the right JCL, it has to get that JCL somewhere from and change some parts of it.
3) the JCL has to be maintained by site management. They are used to make JCL themselves. Normally they store their JCL inside a CNTL library, that is a partitioned dataset. In the CICS environment, that CNTL library is not available to read.
The architect wants me to read that JCL from a DB2 CLOB.
To make that possible, the JCL has to be copied from that CNTL member into the CLOB.
I hope it is better understandable now. |
|
Back to top |
|
|
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Thu Nov 14, 2013 4:29 pm Post subject: |
|
|
@William:
this option:
You have a bunch of JCL statements you want to stick into DB2 as a bunch of stuff in a CLOB.
Thanks for understanding! |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Thu Nov 14, 2013 5:03 pm Post subject: |
|
|
I understand storing jcl in a database for later submission. i still do not understand wht a CLOB?
If you had a "JCL" table with the submitted job as the key (just like the pds was) and each row was a jcl or control statement (that could be modified at submit time) what else would be needed?
It sounds like whoever is providing your direction has a "solution" in search of a requirement.
As i mentioned, i've seen jcl that was programmatically generated and/or subiltted at Very Many sites and it works perfectly. I have not yet seen a CLOB needed . . . _________________ All the best,
di |
|
Back to top |
|
|
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Thu Nov 14, 2013 5:40 pm Post subject: |
|
|
the architect is the boss. He decides what is best. So.... it is not about why, it is about how, even when everybody thinks it is not the right way |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Fri Nov 15, 2013 2:40 pm Post subject: |
|
|
Quote: |
the architect is the boss. He decides what is best.
| While he is the boss and you may have to follow his questionable direction, it does NOT mean he is right. Several of us "seniors" make our living by helping re-design problem implementations. This may or may not be one.
If, for some reason, he insists on this approach you will need to do it. It would be interesting to understand Why this is what he wants. If he is approachable, you might ask but don't cause yourself a problem. _________________ All the best,
di |
|
Back to top |
|
|
bauer Intermediate
Joined: 10 Oct 2003 Posts: 315 Topics: 49 Location: Germany
|
Posted: Mon Nov 18, 2013 3:01 am Post subject: |
|
|
Hi Crox,
my understanding ist:
1) Load JCL from PDS / PDSE dataset to DB2 Table with CLOB column, one PDS member is one CLOB element
2) Execute CICS TC, TC reads CLOB with JCL lines and submit JCL from CLOB Column using internal reader
Right ?
See manual LOBs with DB2 for z/OS:
Stronger and Faster , SG24-7270-00
chapter 6.3.2 Loading LOB data using file reference variables
or DB2 10 for z/OS
Utility Guide and Reference, SC19-2984-07, chapter 16
Key word is "loading LOB data using file reference variables"
Should work in this way, I did it some years ago.
May be, i will find my old load jcl .........
kind regards,
bauer |
|
Back to top |
|
|
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Mon Nov 18, 2013 6:16 am Post subject: |
|
|
Thanks for your tips Bauer,
I will look it up.
Regards,
Crox |
|
Back to top |
|
|
|
|