View previous topic :: View next topic
|
Author |
Message |
mathi.vanan
New User
Joined: 11 Jan 2012 Posts: 18 Location: INDIA
|
|
|
|
Hi all... I have been using DSNUPROC for unload and never used BMC unload.
My unload job with DSNUPROC fails because of access issue for tables. I would need to know, if i try using BMC unload would the access issue for 'select authority' would still be there?
Moreover, can i get a syntax of using the BMC unload? Below is the JCL which i use using DSNUPROC.
//JOB CARD
//UTIL EXEC DSNUPROC, SYSTEM=DSN,UID=UNLOAD
//ULDDDN DD DSN=IMAGE.DATA,DISP=(NEW,CATLG,DELETE),
// UNIT=(SYSDA,3),SPACE=(CYL,(15,30),RLSE),
// DCB=(RECFM=FB,BLKSIZE=28672,LRECL=4096)
//PNHDDN DD DSN=PUNCH.DSN,DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(15,30),RLSE),
// DCB=(RECFM=FB,BLKSIZE=28672,LRECL=4096)
//SYSPRINT DD SYSOUT=*
//UTPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
UNLOAD TABLESPACE <TABLESPACE NAME>
FROMCOPY <imagecopy file>
PUNCHDDN ULDDDN UNLDDN PNHDDN
/*
***** I understand that i need to get access for unload. But my question is, if i use BMC unload, would i require select authority or not?
Also, the syntax please.. |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
Yes.... If you do not have authority to unload data from the table then with BMC unload also you wont be able to unload data |
|
Back to top |
|
|
lindovaldolpn
New User
Joined: 25 Feb 2010 Posts: 16 Location: Brazil
|
|
|
|
//* IT´s a sample using DSNTIAUL format
//SYSIN DD *
UNLD FORMAT(DSNTIAUL) OUTDDN(SYSREC01)
FROM TABLE CREATOR.TABLE [(COL1, COL2,...,COLn)]
WHERE COL1=000
I worked with CDB and you can do unload using <imagecopy file>, but I don´t know whether in this case you need authority to do it.
Lindovaldo |
|
Back to top |
|
|
mathi.vanan
New User
Joined: 11 Jan 2012 Posts: 18 Location: INDIA
|
|
|
|
Thanks lindovaldolpn.
Can someone help me with creating a JCL using BMC unload, for unloading from an imagecopy? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
what about cloning an existing jcl inside Your organization ? |
|
Back to top |
|
|
mathi.vanan
New User
Joined: 11 Jan 2012 Posts: 18 Location: INDIA
|
|
|
|
Enrico... i had tried... but most use IBM utility (as I do)..
Desperately needing a sample to unload an imagecopy by BMC. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
how about getting hold of the BMC manuals that your organisation holds? |
|
Back to top |
|
|
mathi.vanan
New User
Joined: 11 Jan 2012 Posts: 18 Location: INDIA
|
|
|
|
checked with few colleagues if would be able to get one, unfortunately, the answer was 'not sure if there is one'... |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
If you are licensed to use the product then there will be manuals available and you could get more from BMC. |
|
Back to top |
|
|
lindovaldolpn
New User
Joined: 25 Feb 2010 Posts: 16 Location: Brazil
|
|
|
|
Maybe it could be useful.
This was the IBM unload:
//SYSCOPY1 DD DSN=DISSDB2.ICOPYDBP.W44NSBOL(0),DISP=SHR
//SYSPUNCH DD DSN=UNLOAD.PGMRMXV.DSNP.WW44N.W44NSBOL.LOADCTL,
// DISP=(NEW,CATLG,DELETE),
// DCB=(DISK.MODEL),
// UNIT=DISK,VOL=SER=XNM806,
// SPACE=(CYL,(1,1),RLSE)
//SYSREC DD DSN=UNLOAD.PGMRMXV.DSNP.WW44N.W44NSBOL.DATA,
// DISP=(NEW,CATLG,DELETE),
// DCB=(DISK.MODEL),
// UNIT=DISK,VOL=SER=XNM806,
// SPACE=(CYL,(175,75),RLSE)
//SYSIN DD *
UNLOAD TABLESPACE WW44N.W44NSBOL
FROMCOPYDDN SYSCOPY1
PUNCHDDN SYSPUNCH
UNLDDN SYSREC
NOSUBS NOPAD
/*
Regards |
|
Back to top |
|
|
mathi.vanan
New User
Joined: 11 Jan 2012 Posts: 18 Location: INDIA
|
|
|
|
Can someone clarify this please:
I am trying to unload from an imagecopy file and not from a table.
I have access to the imagecopy file. My unload statement in the JCL has the following snippet. I do not have a 'SELECT' clause in my JCL.
Would i need SELECT or READ access to the 'table'?
My JCL looks like this:
//<<JOBCARD>>
//UNLOAD06 EXEC PGM=ADUUMAIN,REGION=0M,
// PARM='<<PARMS>>'
//STEPLIB DD DSN=<<LOADLIB>>,DISP=SHR
//SORTWK01 DD DISP=(,DELETE),UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//CAIPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=C
//SYSIN DD *
UNLOAD TABLESPACE <<TABLESPACE NAME>>
INFILE IMAGECOPY
SHRLEVEL CHANGE
OPNDB2ID=YES
//SYSREC DD DSN=<<DATA FILE>>,
// DISP=(MOD,CATLG,DELETE),SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSCNTL DD DSN=<CNTL FILE>>,
// DISP=(MOD,CATLG,DELETE),SPACE=(TRK,(1,1)),UNIT=SYSDA
//UTPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
/*
My question is:
If i just have access to IMAGECOPY file and 'NO' access to the DB2 table, would i be able to unload?
Rather, is there a possibility to unload from an IMAGECOPY file, using BMC, without access to the DB2 table? |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
Quote: |
If i just have access to IMAGECOPY file and 'NO' access to the DB2 table, would i be able to unload?
|
NO !! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
why ask again... You already received a reply
the first question was worded for a YES reply ( do I need authority )
the second question was worded for a NO reply ( would I be able to ) |
|
Back to top |
|
|
mathi.vanan
New User
Joined: 11 Jan 2012 Posts: 18 Location: INDIA
|
|
|
|
Questioning again was because of research in the internet
www.idug.org/p/fo/et/thread=35312
The above link has a post by Randy Bright, which weakens my stand on saying that we need authority on the tables to unload from imagecopy, using BMC.
Any thoughts or inputs is greatly appreciated...! |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hello,
You should have read the posts closely,
To accomplish these things You must have Authority on multiple items + other things,
Must have authority to read the Imagecopy dataset
You must have DDL of the table/tablespace for which IC was taken at that time
You must have all the related object id's
You must have access to the catalog
Since you are planning on using a third party tool, in the background they use DB2 Plan, so you must have EXECUTE authority to the plan.
Even if you have all the above, still it cannot be accomplished because you don't have a model BMC unload jcl + BMC Unload manual, because these sort of stuff require lots of customization then the regular unload JCL's. Still the job would fail, saying "You need to be a SYSADM"
So....
Easy thing would be to ask the DBA.
Regards,
Sushanth |
|
Back to top |
|
|
mathi.vanan
New User
Joined: 11 Jan 2012 Posts: 18 Location: INDIA
|
|
|
|
I did read it and apart from access to the tables, i do have everything in place including the DDL/catalog info.
Further to the discussions on access,
http://www.idug.org/p/fo/et/thread=40002
Since the research on this situation still goes on, my customer accepted to provide access to the tables.
But my question is still alive. Based on the above post it seems that is possible to unload without access..
Anyone, who can provide with some pointers would be greatly appreciated. |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Are you sure that you can even DO an unload from an image copy??? An image copy has the data in the same format as the disk image. However, an UNLOAD has the data in the logical sequence.
I remember asking this question about the BMC IMS tools. (I ended up standing next to a visiting BMC developer in the parking lot during a fire in our building.)
He didn't think they could do it. The only way was to restore the image copy, then unload that database. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
mathi.vanan wrote: |
I did read it and apart from access to the tables, i do have everything in place including the DDL/catalog info.
Further to the discussions on access,
http://www.idug.org/p/fo/et/thread=40002
But my question is still alive. Based on the above post it seems that is possible to unload without access..
Anyone, who can provide with some pointers would be greatly appreciated. |
Why do you keep asking? That discussion thread makes it pretty clear that you can, and even gives detailed instructions on how to do it. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Ed Goodman wrote: |
Are you sure that you can even DO an unload from an image copy??? An image copy has the data in the same format as the disk image. However, an UNLOAD has the data in the logical sequence. |
From a DB2 image copy, no question; one of our tools generates BMC Unload+ control cards to do just that. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Akatsukami wrote: |
Ed Goodman wrote: |
Are you sure that you can even DO an unload from an image copy??? An image copy has the data in the same format as the disk image. However, an UNLOAD has the data in the logical sequence. |
From a DB2 image copy, no question; one of our tools generates BMC Unload+ control cards to do just that. |
IBM's UNLOAD utility (not to be confused with DSNTIAUL, which is just an application program) also has the ability to unload from an image copy. The table has to exist in the catalog and the person running the job needs SELECT authority on the table. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
sushanth bobby wrote: |
Easy thing would be to ask the DBA. |
yes, because they have nothing better to do than sit around waiting for dumb questions. |
|
Back to top |
|
|
M David Hunter
New User
Joined: 30 Jan 2012 Posts: 6 Location: United States
|
|
|
|
This is a process we use for UNLOAD that my predecessor created. Note I use DSNUTILB
Code: |
//steplib EXEC PGM=DSNUTILB,PARM='subsystemID,dbnametsname'
//STEPLIB DD DSN=DB2.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
TEMPLATE UNLDDS
UNIT CART
DSN 'DB2.&SSID..ULD.&DB..&TS..D&YE(3,2).&MO.&DA..T&TIME(1,4).'
TEMPLATE CNTLDS
UNIT 3390
DSN 'DB2.&SSID..ULC.&DB..&TS..D&YE(3,2).&MO.&DA..T&TIME(1,4).'
UNLOAD
TABLESPACE dbname.tsname
FROMCOPY ESCDP00.ICF.dbname.tsname.G0588V00
FROMVOLUME CATALOG
FROM TABLE dbname.tablename
UNLDDN UNLDDS
PUNCHDDN CNTLDS |
|
|
Back to top |
|
|
|