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
 

 

some doubt in SELECT * in embedded SQL, DATE,TIME,TIMESTAMP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
mijanurit
Currently Banned

New User


Joined: 26 Aug 2005
Posts: 33
Location: bangalore

PostPosted: Sat Dec 31, 2005 12:40 pm    Post subject: some doubt in SELECT * in embedded SQL, DATE,TIME,TIMESTAMP
Reply with quote

hi all,

i have some doubt regarding some question in DB2.
plz explain these question in detail.
questions are

1. why SELECT* is not preferred in embedded SQL?

2. what are the issues related with correlated subqueries?

3. give the COBOL Definition of a VARCHAR field?

4. THE PHYSICAL STORAGE LENGTH OF DATE,TIME,TIMESTAMP ARE 4BYTES,
3BYTES,10BYTES RESPECTIVELY.
But their cobol picture clause are DATE-->pic x(10), time-->pic x(8)
timestamp-->pic x(26).

here x(10) means 10 characters i.e 10 bytes.
x(8) means 8 characters i.e 8 bytes.
x(26) means 26 characters i.e 26 bytes.
then what is the compatibility between physical storage length of these three datatypes
and picture clause declared in cobol?


thanks in advance

regards
mijanurit
Back to top
View user's profile Send private message

balusengodan

New User


Joined: 01 Mar 2005
Posts: 15
Location: chennai

PostPosted: Fri Jan 27, 2006 11:12 am    Post subject:
Reply with quote

hi mijanurit,

select * is not used in embedded sql because other can also view, select, update the same table. so it will lead to some error values thats why it not used . where as there is high risk of loosing our data

thank
balu
Back to top
View user's profile Send private message
prabs2006

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Fri Jan 27, 2006 12:40 pm    Post subject:
Reply with quote

Hi

1. why SELECT* is not preferred in embedded SQL?
If multiple rows are retrieved how will you store the values.This is not advisble

2. what are the issues related with correlated subqueries?
Efficiency, as it needs to back and forth to get the result

3. Give the COBOL Definition of a VARCHAR field?
Varchar(N) - 01 NAME.
49 NAME-LEN PIC S9(4) USAGE COMP.
49 NAME-TEXT PIC X(N).

4. THE PHYSICAL STORAGE LENGTH OF DATE,TIME,TIMESTAMP ARE 4BYTES, 3BYTES,10BYTES RESPECTIVELY.

No idea what you are exactly asking for.

Thanks & Regards
Prabs
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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 1 Thu Jan 19, 2017 1:31 am
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am


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