View previous topic :: View next topic
|
Author |
Message |
vampire
New User
Joined: 12 Oct 2009 Posts: 15 Location: Pune
|
|
|
|
Wat is the efficient method of fetching data?
From JCL or From Cobol.
Requirement is of fetching only one value at a time. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Wat is the efficient method of fetching data?
From JCL or From Cobol. |
I have no idea what this means -- JCL does absolutely nothing except execute programs, so how you can fetch data from JCL? How would you fetch data from COBOL?
What are you using the fetch the data? Is the data coming from a sequential file, an indexed file, a relative file, or a data base of some sort?
You've left a lot more questions in your post than were answered. |
|
Back to top |
|
|
vampire
New User
Joined: 12 Oct 2009 Posts: 15 Location: Pune
|
|
|
|
sorry,
But I am using the below query
Code: |
,//UNLOAD01 EXEC DB2CPROC,
,// DB2SYS=DATG,
,// COND=(4,LT)
,//SYSTSIN DD *
, RUN PROG(DSNTIAUL) PLAN(DSNTIAUL) -
, PARM('SQL')
, END
,//SYSIN DD *
, SELECT MAX(EMP_KEY)
, FROM TDWPEMP
, WITH UR |
So my question is ...
Running this query from a JCL and using the same in a cobol make any change in performance of my JOB?? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Before you do anything else, suggest you gain an understanding of what you are currently running. . .
You are NOT "Running this query from a JCL". . . You are executing a Procedure (DB2CPROC), which in turn executes a program (most likely the Terminal Monitor Program (IKJEFT1B or similar) which is tso in batch).
JCL does not and has never run a query. . . Maybe someday, but not yet. |
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
I found so many people do not know the answer to the question:
What is JCL?
|
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
dick scherrer wrote: |
You are NOT "Running this query from a JCL". . . You are executing a Procedure (DB2CPROC), which in turn executes a program (most likely the Terminal Monitor Program (IKJEFT1B or similar) which is tso in batch). |
And which is, let it be noted for the record, running the assembler program DSNTIAUL to process the query.
Incidentially, DSNTIAUL does not produce output that easily read programmatically. If that output is not to be read by a human being and typed into a spreadsheet, DMS panel, etc., any efficiency gained by using DSNTIAUL is likely to be lost in running a program or script to parse it.
On the gripping hand, as "Requirement is of fetching only one value at a time.", anything short of etching the disk platter and examing the crystal patterns with a microscope is likely to provide acceptable throughput. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Quote: |
And which is, let it be noted for the record, running the assembler program DSNTIAUL to process the query. |
Yup, eventually. . .
Before DSNTIAUL can be invoked, something else is invoked (i.e. the terminal monitor program). . . Which then invokes DSNTIAUL. . . |
|
Back to top |
|
|
|