View previous topic :: View next topic
|
Author |
Message |
aneeta
New User
Joined: 08 Dec 2005 Posts: 48 Location: Chennai
|
|
|
|
Hi,
I have 10000 employees to be given as input for the below query..
Eg:Select EMP_NAME,EMP_DEPT from a EMPLOYEE where EMP_NUM in ('00012637','82939939',.......)
Is there a way we can do it thru JCL i.e.input file with a list of employees and make the query take the input from the file..or any other ways..
I need a way other than a cobol pgm..I am a beginner in DB2..
Pls help..
Thanks
Aneeta |
|
Back to top |
|
|
prav_06 Warnings : 1 Active User
Joined: 13 Dec 2005 Posts: 154 Location: The Netherlands
|
|
|
|
Aneeta,
Try this JCL
Code: |
//DEX007P JOB (0DEX0080),'XCOM JOB',
// CLASS=C,MSGLEVEL=(1,1),
// NOTIFY=DEX007,MSGCLASS=X,REGION=3M
//STEP01 EXEC PGM=IKJEFT01,DYNAMNBR=20,REGION=0M
//SYSPUNCH DD DSN=EX.DEX007.SYSPUNCH,DISP=SHR
//*SYSREC00 DD DSN=EX.DEX007.UNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB2D)
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) -
LIB('DB2D.RUNLIB.LOAD')
/*
//SYSIN DD *
Your query
/* |
But in the systsin card give u r db2 sys. name and the plan and program available in your installation.
Thamilzan. |
|
Back to top |
|
|
Satish N V Godavarthi
New User
Joined: 23 Feb 2006 Posts: 10 Location: US
|
|
|
|
Aneetha,
I don't think we can dynamically pass values to a query in a JCL.
I only possible way i see through a cobol program and a flat file.
Thanks and bye for now,
GNVS.
There are only 10 people in the world, those who understand computer's and those who don't |
|
Back to top |
|
|
rajandhla
Active User
Joined: 18 Oct 2005 Posts: 182 Location: Luton UK
|
|
|
|
I don't think we can give dynamic input to a query in a jcl. I think you need to write a code code for the requirment.
Regards,
Jr |
|
Back to top |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
I guess using dynamic sql in cobol is the only option.
It will build your querry at run time and then execute.
Thanks,
-Kapil. |
|
Back to top |
|
|
|