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

Efficient method for fetching data from a table


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vampire

New User


Joined: 12 Oct 2009
Posts: 15
Location: Pune

PostPosted: Wed Oct 14, 2009 7:34 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Oct 14, 2009 7:38 pm
Reply with quote

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
View user's profile Send private message
vampire

New User


Joined: 12 Oct 2009
Posts: 15
Location: Pune

PostPosted: Wed Oct 14, 2009 7:53 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 14, 2009 8:46 pm
Reply with quote

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
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Wed Oct 14, 2009 9:01 pm
Reply with quote

I found so many people do not know the answer to the question:

What is JCL?

icon_biggrin.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Oct 14, 2009 11:18 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 14, 2009 11:34 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
Search our Forums:

Back to Top