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

DB2 Unload from imagecopy files using BMC


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mathi.vanan

New User


Joined: 11 Jan 2012
Posts: 18
Location: INDIA

PostPosted: Thu Jan 19, 2012 1:44 pm
Reply with quote

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

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Thu Jan 19, 2012 4:22 pm
Reply with quote

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

New User


Joined: 25 Feb 2010
Posts: 16
Location: Brazil

PostPosted: Thu Jan 19, 2012 7:15 pm
Reply with quote

//* 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
View user's profile Send private message
mathi.vanan

New User


Joined: 11 Jan 2012
Posts: 18
Location: INDIA

PostPosted: Thu Jan 19, 2012 7:32 pm
Reply with quote

Thanks lindovaldolpn.

Can someone help me with creating a JCL using BMC unload, for unloading from an imagecopy?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jan 19, 2012 8:55 pm
Reply with quote

what about cloning an existing jcl inside Your organization ?
Back to top
View user's profile Send private message
mathi.vanan

New User


Joined: 11 Jan 2012
Posts: 18
Location: INDIA

PostPosted: Thu Jan 19, 2012 8:57 pm
Reply with quote

Enrico... i had tried... but most use IBM utility (as I do)..

Desperately needing a sample to unload an imagecopy by BMC. icon_redface.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Jan 19, 2012 8:58 pm
Reply with quote

how about getting hold of the BMC manuals that your organisation holds?
Back to top
View user's profile Send private message
mathi.vanan

New User


Joined: 11 Jan 2012
Posts: 18
Location: INDIA

PostPosted: Thu Jan 19, 2012 9:06 pm
Reply with quote

icon_rolleyes.gif

checked with few colleagues if would be able to get one, unfortunately, the answer was 'not sure if there is one'...
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Jan 19, 2012 9:13 pm
Reply with quote

If you are licensed to use the product then there will be manuals available and you could get more from BMC.
Back to top
View user's profile Send private message
lindovaldolpn

New User


Joined: 25 Feb 2010
Posts: 16
Location: Brazil

PostPosted: Fri Jan 20, 2012 4:47 pm
Reply with quote

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

New User


Joined: 11 Jan 2012
Posts: 18
Location: INDIA

PostPosted: Fri Jan 20, 2012 5:13 pm
Reply with quote

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

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Fri Jan 20, 2012 5:23 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Jan 20, 2012 5:29 pm
Reply with quote

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

New User


Joined: 11 Jan 2012
Posts: 18
Location: INDIA

PostPosted: Tue Jan 31, 2012 2:03 pm
Reply with quote

Questioning again was because of research in the internet icon_cry.gif

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

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Thu Feb 02, 2012 9:25 pm
Reply with quote

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

New User


Joined: 11 Jan 2012
Posts: 18
Location: INDIA

PostPosted: Fri Feb 03, 2012 11:17 am
Reply with quote

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

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Fri Feb 03, 2012 10:15 pm
Reply with quote

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

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Fri Feb 03, 2012 11:30 pm
Reply with quote

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

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Feb 03, 2012 11:55 pm
Reply with quote

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

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Sat Feb 04, 2012 2:35 am
Reply with quote

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

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri Feb 10, 2012 9:36 pm
Reply with quote

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. icon_evil.gif
Back to top
View user's profile Send private message
M David Hunter

New User


Joined: 30 Jan 2012
Posts: 6
Location: United States

PostPosted: Tue Feb 28, 2012 7:47 pm
Reply with quote

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
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top