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 when using Redefines

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

New User


Joined: 09 Nov 2006
Posts: 21

PostPosted: Mon Jul 06, 2009 3:32 pm    Post subject: Problem when using Redefines
Reply with quote

Hi,

I am preparing an XML to an external system.
Say i have an 3 records.

I have definition like
10 XML-ORDRE-STATUS-SUCCESS.
15 XML-ORDRE-SUCCES PIC X(21).
15 FILLER PIC X(39)
VALUE '</status>'.

10 XML-ORDRE-STATUS-FAIL REDEFINES XML-ORDRE-STATUS-SUCCESS.
15 XML-ORDRE-FAILED PIC X(17).
15 XML-record PIC X(39) .
15 FILLER PIC X(4).

move </status> is moved to xml-record
I have 3 records
successful
failed
successful

i send xml as below

<status>successful </status>
for 2nd order
<status> failed </status>
for 3rd order
<status> successfulatus

after 2nd record xml for failed is sent. in the 3rd record first 4 characters
of </st> is not coming.

is there a problem with redefines. is there a better way to do?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7995
Location: Bellevue, IA

PostPosted: Mon Jul 06, 2009 4:40 pm    Post subject:
Reply with quote

There's no problem with REDEFINES. There is a problem with the way you're using it, but REDEFINES did exactly what you told it to do. If you check your character count, you'll see the fields don't align. Fix your problem with the alignment and your issue goes away.
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 Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm


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