Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to display offset thru cobol prog... tvinodkumar7 CICS 2 Sun Apr 22, 2018 8:42 pm
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts COBOL MVS options BiswajitDG COBOL Programming 8 Fri Apr 06, 2018 12:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us