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

File to DB2 table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Jyothsna yenne

New User


Joined: 11 Jul 2007
Posts: 6
Location: Texas

PostPosted: Thu Dec 27, 2007 4:49 pm
Reply with quote

I have a PS file which contains around 10 million records which has to be loaded to DB2 table. Do we have a job to do the same?

Jyothsna
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Dec 27, 2007 5:23 pm
Reply with quote

Have you tried the manuals?

O.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Thu Dec 27, 2007 5:25 pm
Reply with quote

Hi Jyothsna,

If you want to do it through COBOL program, READ the file and write it into TABLE using SQL query.

Regards,
KSK
Back to top
View user's profile Send private message
abhishekmdwivedi

New User


Joined: 22 Aug 2006
Posts: 95
Location: india

PostPosted: Thu Dec 27, 2007 5:33 pm
Reply with quote

Jyothsna,

This will help you out.
[url]
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNUGH11/2.12.5?SHELF=DSNSHHA1&DT=20010719144747&CASE=
[/url]
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Dec 27, 2007 5:36 pm
Reply with quote

There can be many methods, I use BMC utility to do that. It's a third party tool. Check whether if it's installed on your site.
Back to top
View user's profile Send private message
Jyothsna yenne

New User


Joined: 11 Jul 2007
Posts: 6
Location: Texas

PostPosted: Thu Dec 27, 2007 7:28 pm
Reply with quote

ThanQ so much for all your replies. icon_smile.gif

Actually I used the below jcl

/*JOBcard
//***************************************************************
//* LOAD THE PRIMS TEST DATABASE
//***************************************************************
//*
//LOAD010 EXEC DSNUPROC,
// SYSTEM=DBT1,LIB='SYS1.DB2.TX.LOAD',
// UID='',UTPROC=''
//* UID='',UTPROC='RESTART'
//* INPUT DATA SET GOES HERE
//DSNUPROC.SYSREC DD DSN=TE.MKOUTL.MCENU30,DISP=SHR
//*
//* REJECTED RECORDS
//DSNUPROC.SYSDISC DD DSN=TE.MKTOUTL.REJECT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)
//* DATABASE KEYS
//DSNUPROC.SYSUT1 DD DSN=TE.LOAD.MKTOUTL.SYSUT1,
// DISP=(MOD,DELETE,CATLG),
//* UNIT=TAPEC,RETPD=0090
// UNIT=SYSDA,SPACE=(CYL,(200,25),RLSE)
//* INDEX FIELD NAMES
//DSNUPROC.SORTOUT DD DSN=TE.LOAD.MKTOUTL.SORTOUT,
// DISP=(MOD,DELETE,CATLG),
// UNIT=SYSDA,SPACE=(CYL,(200,50),RLSE)
//DSNUPROC.SYSERR DD DSN=TE.LOAD.MKTOUTL.SYSERR,
// DISP=(MOD,DELETE,CATLG),
// UNIT=SYSDA,SPACE=(CYL,(100,50),RLSE)
//DSNUPROC.SYSMAP DD DSN=TE.LOAD.MKTOUTL.SYSMAP,
// DISP=(MOD,DELETE,CATLG),
// UNIT=SYSDA,SPACE=(CYL,(100,90),RLSE)
//DSNUPROC.SORTWK01 DD DSN=TE.LOAD.SORTWK01,
// DISP=(MOD,DELETE,CATLG),
// UNIT=SYSDA,SPACE=(CYL,(100,90),RLSE)
//DSNUPROC.SORTWK02 DD DSN=TE.LOAD.SORTWK02,
// DISP=(MOD,DELETE,CATLG),
// UNIT=SYSDA,SPACE=(CYL,(100,90),RLSE)
//DSNUPROC.SORTWK03 DD DSN=TE.LOAD.SORTWK03,
// DISP=(MOD,DELETE,CATLG),
// UNIT=SYSDA,SPACE=(CYL,(100,90),RLSE)
//DSNUPROC.SORTWK04 DD DSN=TE.LOAD.SORTWK04,
// DISP=(MOD,DELETE,CATLG),
// UNIT=SYSDA,SPACE=(CYL,(100,90),RLSE)
//DSNUPROC.SYSIN DD DSN=TE.MKOUTL.UNLOAD.PUNCH1,DISP=SHR
//*
//


It gave me the error


1DSNU000I DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = N87532.N87532A
DSNU1044I DSNUGTIS - PROCESSING SYSIN AS EBCDIC
0DSNU050I DSNUGUTC - LOAD DATA LOG NO INDDN SYSREC00
DSNU650I -DBT1 DSNURWI - INTO TABLE DBADB2.MSP_SALES_PLAN
DSNU060I -DBT1 DSNUGMAP - USER N87532 NOT AUTHORIZED FOR LOAD UTILITY ON DATABASE MSP1001D
DSNU012I DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=12


I have never used "MSP1001D" anywhere.my peers are saying that this is a production dabase. but I have mentioned DBT1 in "SYSTEM=DBT1" which is a test region.

can you please help me out in resolving these queries
1) where am I getting "MSP1001D" from.
2) If it is not a production database, Do I need to have the access on LOAD Utility in JCL?

I'm sure that the tables which I am loading are in test database.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Fri Dec 28, 2007 10:35 am
Reply with quote

For this,

You need to have Read / WRITE access on the Database MSP1001D.

To know whether it is Production database or Test database, the best person would be ur DBA.
Back to top
View user's profile Send private message
Jyothsna yenne

New User


Joined: 11 Jul 2007
Posts: 6
Location: Texas

PostPosted: Fri Dec 28, 2007 12:31 pm
Reply with quote

I haven't mentioned "MSP1001D" anywhere in the JCL. but where am I getting "MSP1001D" from???
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Dec 28, 2007 1:23 pm
Reply with quote

Quote:
Do we have a job to do the same?


Why do You ask for a job/jcl if You already have one??

search/read the db2 manuals to get acquainted with the terms being used ...

table, table space, database, ... ...

a little bit of searching and reading will help Your understanding of things

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/DSNSHKA0
Back to top
View user's profile Send private message
Jyothsna yenne

New User


Joined: 11 Jul 2007
Posts: 6
Location: Texas

PostPosted: Fri Dec 28, 2007 1:54 pm
Reply with quote

I used the link which abhishekmdwivedi have given us...I gave that jcl which is there in that link to one of senior mainframe person and asked him to suggest me the modifications to be made in that...so he gave me this jcl...

after this mail itself, i have got this JCL...i didn't have it before
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Dec 28, 2007 2:09 pm
Reply with quote

Quote:
after this mail itself, i have got this JCL...i didn't have it before


strong suggestion

Usually database ( in larger sense ) related tasks are coordinated by a support group,
which usually provides samples and templates to be used for the most common tasks
( load, unload, image copies, recovery )
if they do not have such approach which means poor working habits,
it would be better also to teach them how to do their job

it is wrong to use for system and data base related tasks, procedures given by people outside Your organization,
these procedures/JCLs normally reflect different standards and habits

debugging in this case is difficult, understand Your standards, find and correct the errors


in this case the only reasonable answer is....
speack with Your support group !
Back to top
View user's profile Send private message
Jyothsna yenne

New User


Joined: 11 Jul 2007
Posts: 6
Location: Texas

PostPosted: Fri Dec 28, 2007 2:33 pm
Reply with quote

Quote:
it is wrong to use for system and data base related tasks, procedures given by people outside Your organization


sorry for using this forum...and thanQ so much for your valuable suggestion...
Back to top
View user's profile Send private message
Jyothsna yenne

New User


Joined: 11 Jul 2007
Posts: 6
Location: Texas

PostPosted: Fri Dec 28, 2007 2:38 pm
Reply with quote

Not particularly this forum...i mean any public forum...i should have directly asked my support group..once again sorry....bubyeee
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Dec 28, 2007 2:45 pm
Reply with quote

Quote:
sorry for using this forum


dumb comment icon_biggrin.gif

Sorry if I was misunderstood icon_sad.gif

I was not implying that You had done anything wrong...
asking for help is NEVER wrong as long as You learn from it

I was simply implying that
many organizations have a poor approach in supporting their people ...
by not giving them the right tools to work with
by leaving them too often alone when there are problems
and what's worse not providing the proper documentation
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 Unable to interpret a hex value to De... COBOL Programming 4
No new posts how to eliminate null indicator value... DB2 7
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Unload and Load ISPF Table TSO/ISPF 4
No new posts ISPF Table to add a new column TSO/ISPF 1
Search our Forums:

Back to Top