Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

File to DB2 table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Jyothsna yenne

New User


Joined: 11 Jul 2007
Posts: 6
Location: Hyderabad,India

PostPosted: Thu Dec 27, 2007 4:49 pm    Post subject: File to DB2 table
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: 2360
Location: Israel

PostPosted: Thu Dec 27, 2007 5:23 pm    Post subject:
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: 356
Location: New York

PostPosted: Thu Dec 27, 2007 5:25 pm    Post subject:
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    Post subject: Reply to: File to DB2 table
Reply with quote

Jyothsna,

This will help you out.
[url]
http://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

Senior Member


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

PostPosted: Thu Dec 27, 2007 5:36 pm    Post subject:
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: Hyderabad,India

PostPosted: Thu Dec 27, 2007 7:28 pm    Post subject:
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    Post subject: Hi Jyothsna
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: Hyderabad,India

PostPosted: Fri Dec 28, 2007 12:31 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Dec 28, 2007 1:23 pm    Post subject: Reply to: File to DB2 table
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: Hyderabad,India

PostPosted: Fri Dec 28, 2007 1:54 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Dec 28, 2007 2:09 pm    Post subject: Reply to: File to DB2 table
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: Hyderabad,India

PostPosted: Fri Dec 28, 2007 2:33 pm    Post subject:
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: Hyderabad,India

PostPosted: Fri Dec 28, 2007 2:38 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Dec 28, 2007 2:45 pm    Post subject: Reply to: File to DB2 table
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us