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

After retrieving records using cursors, can perform update


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandhyamf
Warnings : 1

New User


Joined: 07 Feb 2007
Posts: 3
Location: hyderabad

PostPosted: Fri Feb 09, 2007 3:55 pm
Reply with quote

Hi,

After retrieving records using cursors,how can perform update?
What is the max size of working storage section?
What is onsize error in cobol?

Regards,
Sandhya.
Back to top
View user's profile Send private message
manihcl85
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 52
Location: chennai

PostPosted: Fri Feb 09, 2007 6:06 pm
Reply with quote

Hi,

U have to use update cursor cursorname set fieldname = value where "record u want to update" or "current of cursor for updating the current record"

Regards,
Mani
Back to top
View user's profile Send private message
manihcl85
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 52
Location: chennai

PostPosted: Fri Feb 09, 2007 6:18 pm
Reply with quote

Hi,

onsize error is an function to say what to do in case if any overflow or error due to size of an variable occured.

Regards,
Mani
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Feb 10, 2007 5:19 am
Reply with quote

You can also get a SIZE ERROR dividing by zero or when using windowed date fields (I've never used these date fields, so I have no details.)
Back to top
View user's profile Send private message
hanu_010

New User


Joined: 25 Jan 2007
Posts: 9
Location: hyd

PostPosted: Thu Mar 01, 2007 11:02 pm
Reply with quote

FOR UPDATE OF IS DECLARED IN DECLARE CURSOR

AFTER FETCH


WE UPDATE THE COLUMNS AND SHOULD CODE WHERE CURRENT OF
Back to top
View user's profile Send private message
hanu_010

New User


Joined: 25 Jan 2007
Posts: 9
Location: hyd

PostPosted: Thu Mar 01, 2007 11:08 pm
Reply with quote

ON SIZE ERROR IS USING TO TRAP THE SIZE ERRORS

01 A PIC 99.
01 B PIC 99.
01 C PIC 99.

COMPUTE C = A + B.

A=90
B=10

AFTER CALUCLATION A + B = 100,

BUT C HAS A PIC 99.

SO FINAL RESULT WILL BE 00

SO THERE IS SIZE ERROR

TO AVOID THIS WE HAVE TO USE ON SIZE ERROR

COMPUTE C = A +B ON SIZE ERROR DISPLAY ' SIZE ERROR'
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 5
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Use of Perform Thru Exit COBOL Programming 6
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top