Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Without OCCURS CLAUSE can we select row

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
rambabu110
Warnings : 1

New User


Joined: 06 Feb 2006
Posts: 9
Location: Bangalore

PostPosted: Mon May 05, 2008 8:43 am    Post subject: Without OCCURS CLAUSE can we select row
Reply with quote

Hi,

1)On What base(means what situations)we go for Redefines clause? other than memory usage. icon_question.gif

2)without OCCURS CLAUSE can we select row by using Select Query many number of rows?On What base(means what situations)we go for Occurs clause?
Back to top
View user's profile Send private message
References
PostPosted: Mon May 05, 2008 8:43 am    Post subject: Re: Without OCCURS CLAUSE can we select row Reply with quote

dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 6944
Location: 221 B Baker St

PostPosted: Mon May 05, 2008 8:53 am    Post subject:
Reply with quote

Hello,

1. redefines can be used for decomposition (i.e. to break down a date from x(8) to cc,yy,mm,dd) or when the same area has multiple definitions (i.e. a file with multiple record formats).

2. occurs has nothing to do with db2/cursors/select. etc. SQL prohibits "repeating groups" which is what occurs is used for.
Back to top
View user's profile Send private message
rambabu110
Warnings : 1

New User


Joined: 06 Feb 2006
Posts: 9
Location: Bangalore

PostPosted: Tue May 06, 2008 7:40 am    Post subject:
Reply with quote

2)without CURSORS can we select row by using Select Query many number of rows?On What base(means what situations)we go for Occurs clause?
Back to top
View user's profile Send private message
rambabu110
Warnings : 1

New User


Joined: 06 Feb 2006
Posts: 9
Location: Bangalore

PostPosted: Tue May 06, 2008 7:41 am    Post subject:
Reply with quote

rambabu110 wrote:
2)without CURSORS can we select row by using Select Query many number of rows?On What base(means what situations)we go for
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 6944
Location: 221 B Baker St

PostPosted: Tue May 06, 2008 7:47 am    Post subject:
Reply with quote

Hello,

If an embedded select (in a program) returns more than one row, it will raise an error.

If the result of your query (in a program) is more than one rows, you would use a cursor.

When using a cursor, you declare the cursor, open the cursor, and fetch rows until all have been processed.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 821
Location: Chennai - India

PostPosted: Sat May 10, 2008 4:03 am    Post subject: Reply to: Without OCCURS CLAUSE can we select row
Reply with quote

ram,

you are confusing both OCCURS and CURSORS. read the manuals andpost if it is still not clear.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1