GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Mainframe  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 140 of 159    Print  
What is the reference modification

  
Total Answers and Comments: 3 Last Update: June 20, 2008     Asked by: sprabodhini 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 08, 2008 05:28:57   #1  
sathya swaminathan Member Since: May 2008   Contribution: 3    

RE: What is the reference modification
Say the following is your cobol code:
000340 01  TREE-TYPE      PIC X(15) VALUE 'BANANATREE'. 000350 01  FRUIT-TYPE     PIC X(15) VALUE 'BANANA'.     000360 01  TREE-FRUIT     PIC X(5).   If you wanna move only particular value to another variable instead of as a whole value you can use reference modification.
For Eg :

You can say
004310 004320 MOVE TREE-TYPE(1:5) TO TREE-FRUIT. 004440
This will move "BANAN" to TREE-FRUIT. (The letters from position 1 of TREE-TYPE for 5 positions.So this : (colon) is called ref modification indicator.Like this you can use MOVE TREE-TYPE(2:4) TO TREE-FRUIT.So the character from 2nd position for 4 character length will get move.





 
Is this answer useful? Yes | No
May 12, 2008 07:44:20   #2  
guraddiv Member Since: April 2008   Contribution: 19    

RE: What is the reference modification
it is a techinque which is used to extract some part of a variable.
 
Is this answer useful? Yes | No
June 20, 2008 03:22:24   #3  
pawan_kch Member Since: June 2008   Contribution: 1    

RE: What is the reference modification
Reference modification is used to retrieve/replace the set of characters from a string.

Ex: MOVE WS-VAR(1:5) TO PV-VAR.
      MOVE 'GEEK' TO WS-VAR(1:4).
     

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape