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
 

 

Cobol Interview Questions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
saidharrao
Warnings : 1

New User


Joined: 19 Feb 2005
Posts: 27
Location: hyderabad-ap-india

PostPosted: Sun Mar 20, 2005 8:51 pm    Post subject: Cobol Interview Questions
Reply with quote

My dear friends i have the following doubt in Cobol..
1.What is meant by Reference Modofication..can anybody give me explaination with an example..

2. Where do we cannot use MOVE verb
a) OCCURS clause
b) USAGE is COMP
c) USAGE is POINTER
d) NONE
3. Can we use $ and Z together to a field?
4.What is INITIAL ? ( we use it program name).
quick reply is highly appriciated..

thanking you,
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Mar 20, 2005 11:09 pm    Post subject:
Reply with quote

Hi Saidhar,

1) Ref/Mod allows you to reference any byte or bytes in a field of data when using a COBOL stmt, such as move. Some stmts don't allow its use. Check the stmt's description in the COBOL ref manual before using it. An example: Suppose you wanted to move bytes 4 thru 8 of frm-fld to positions 3 thru 7 of to-fld. The move stmt would look like this:

move frm-fld(4:5) to to-fld(3:5)

2) Where can we not use MOVE verb? C
Data is moved to and from POINTER data items via the SET stmt.

3) Can we use $ and Z together to a field? No $ is a floating fill char and serves a similar purpose to Z. If you code $$$$9.99 a value of 142.98 wotld print as $149.98 with 1 leading space; a value of .98 would print as $0.98 with 3 leading spaces.

So you see there's no reason to include Zs too.

4) What is INITIAL ? ( we use it program name). This tells the compiler to generate code that results in Working Starage being reinitialized whenever it is CALLed. That is the values you originally coded in the VALUE clauses in the pgm are reinserted in the data fields. This means that whatever values were there when the previous execution ended are overlaid and no longer available.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm


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