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
 

 

Problem with COBOL Redefines Clause

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ksivapradeep

New User


Joined: 30 Jul 2004
Posts: 95

PostPosted: Mon Sep 13, 2004 11:10 am    Post subject: Problem with COBOL Redefines Clause
Reply with quote

my coding is like this:

WORLING-STORAGE SECTION.
01 G-1.
05 FLD1 pic x(3) VALUE 'ABC'.
05 FLD2 pic x(6) VALUE 'DEFGHI'.
01 G-2 REDEFINES G-1.
05 FLD3 PIC X(6).
05 FILLER PIC X(3).
PROCEDURE DIVISION.
MOVE FLD3 TO FLD2.
DISPLAY 'RESULT OF G-1 AFTER MOVING FLD3 TO FLD2 = ' G-1.

O/P: RESULT OF G-1 AFTER MOVING FLD3 TO FLD2 = ABCABCABC

but how it is can any body explain.
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Sep 13, 2004 9:24 pm    Post subject:
Reply with quote

Hi K,

The explanation is: you performed an overlapping MOVE and you deserve everything you got. icon_smile.gif

I've seen this technique (OL move) used to initialize a field to spaces. It was supposed to be more efficient. Don't remember the details though.

My advice: don't do OL moves.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Sep 13, 2004 9:46 pm    Post subject:
Reply with quote

Hi K,

Just a follow-up to my previous post. I notice that you pose quite a few questions to the gruop but you don't bother to answer questions about your problem or send an indication that the proposed solution works or not. Not even a simple "thank you for taking the time and expending the effort to help".

Do you think we get paid for doing this?
Back to top
View user's profile Send private message
ksivapradeep

New User


Joined: 30 Jul 2004
Posts: 95

PostPosted: Wed Sep 15, 2004 9:32 am    Post subject:
Reply with quote

hi jack,
thanks 4 ur advise, 4m now i will replly 4 every one who gave ans to me

regards
pradeep
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 3 Thu Mar 30, 2017 10:34 am
No new posts RULES(NOEVENPACK) in cobol jackzhang75 COBOL Programming 5 Wed Mar 29, 2017 12:47 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm


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