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

what is reference modification?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bubu505
Warnings : 1

New User


Joined: 03 Jan 2006
Posts: 5
Location: india

PostPosted: Wed Jan 04, 2006 12:34 pm
Reply with quote

please help me to know what is reference modification.
Back to top
View user's profile Send private message
umeshkmrsh

New User


Joined: 21 Sep 2005
Posts: 79
Location: India

PostPosted: Wed Jan 04, 2006 1:30 pm
Reply with quote

Reference modification is a feature introduced in COBOL - II. Using this feature we can extract a part of data contained in alphanumeric or alphabetic variable.

For example:
If we have a following variable:

05 WS-DATE-VAR PIC X(10) VALUE '12/06/2006'.
05 WS-MONTH-VAR PIC 9(02).

and our requirement is to retrive month part of WS-DATE-VAR.
We can use:

MOVE WS-DATE-VAR(3:2) TO WS-MONTH-VAR.

Above code will move '06' to WS-MONTH-VAR. Reference modification is similar to SUBSTR() function found in most of the other programming languages.

Its syntax is : variable(start_char:no_of_chars)
Back to top
View user's profile Send private message
umeshkmrsh

New User


Joined: 21 Sep 2005
Posts: 79
Location: India

PostPosted: Wed Jan 04, 2006 1:32 pm
Reply with quote

You can also refer to link http://www.fluffycat.com/cobol/cobol-refer.html for more information.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Reference for COND parameter. JCL & VSAM 1
No new posts Reference documentation DFSDDLT0 IMS DB/DC 2
No new posts Trying to reference a javascript glob... CLIST & REXX 7
No new posts DITTO/ESA R3 User's Guide and Referen... IBM Tools 3
No new posts Mainframe datasets without any last r... All Other Mainframe Topics 1
Search our Forums:

Back to Top