View previous topic :: View next topic
|
Author |
Message |
muthukannan
New User
Joined: 03 Aug 2006 Posts: 42 Location: Chennai
|
|
|
|
Hi,
Can someone please provide me a JCL which will update the DB2 tables by reading the flat files(I.e. PS)...
Thanks,
Mk |
|
Back to top |
|
|
venktv
New User
Joined: 29 Mar 2006 Posts: 59 Location: Montreal
|
|
|
|
Hi MK..
May be you are expecting too much from JCL ..
I dont think anybody is having solution for this..
WIth Regs
Venkat |
|
Back to top |
|
|
muthukannan
New User
Joined: 03 Aug 2006 Posts: 42 Location: Chennai
|
|
|
|
Hi Venktv,
Thanks for your reply.
But i heard we can unload and load using JCL.
So i need the load concept to load data from PS to DB2.
Thanks,
Mk |
|
Back to top |
|
|
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
Hi,
One thing you can do is to load the data in the file to temp table(You can create the temp table in the file format itself ) using a QMF proc.
Create QMF header for the table and also add QMF delimiter between each file field of yours and then add the file to the QMF header nthrough a merge step. Then export that to QMF using EXPORT DATA. Then save the data into a temp table using save data as tem_table. Execute an update query with temp table to update the table u desire. Erase the temp table. If the rows loaded to temp table are going too high, this might consume more time as this temp table does not have index.
Alternatively you can also load the data to temp table. But it requires a temp table to be crated before you execute a load. This will become difficut if you have to schedule this job and also first method make use of a temp table only during the time of execution.
I know this is a bit complicated. Please let me know if you have any qns?
Thanks,
Prajesh |
|
Back to top |
|
|
vini_srcna
Active User
Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
|
|
|
|
If you have records in the flat file, then you got to use the LOAD utility. It makes your life easy. Make sure the LOAD control card matches the File layout. If you are not aware of LOAD utility then its time to go thru manuals. Thats a huge concept and intersting too. |
|
Back to top |
|
|
muthukannan
New User
Joined: 03 Aug 2006 Posts: 42 Location: Chennai
|
|
|
|
Hi All,
Thank for your replies.
Am trying to learn from the manuals.
Thanks,
Mk |
|
Back to top |
|
|
sandeep1dimri
New User
Joined: 30 Oct 2006 Posts: 76
|
|
|
|
Use loadplus and unload plus --if these are there in ur shop
Please let me know if u stuck on the above |
|
Back to top |
|
|
crrindia
Active User
Joined: 02 Jul 2005 Posts: 124 Location: Gurgaon
|
|
|
|
Hi you can use the below mentioned jcl for your requirement. but still you need to provide control cards which you are using while unloading the data from db2 or you have give the correct structuer of the components if you didn't unload data from db2. please let me know if you have any queries.
//LOAD01A EXEC PGM=DSNUTILB,
// REGION=0M,
// PARM=(DB2T,'LOADNVL')
//ABNLIGNR DD DUMMY
//DSSPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=F
//UTPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
LOAD DATA INDDN SYSREC LOG NO MAPDDN SYSMAP
RESUME YES
ENFORCE NO
SORTDEVT SYSDA SORTNUM 12
WORKDDN (SYSUT1,SORTOUT)
INTO TABLE NVL.RETAIL_INVOICE
Thanks!
Rathna Reddy,
Sr. Software Engineer. |
|
Back to top |
|
|
|