MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

copy command

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
sankar narayanan
Beginner


Joined: 16 Oct 2007
Posts: 29
Topics: 12

PostPosted: Wed Jun 18, 2008 5:05 am    Post subject: copy command Reply with quote

Hi All,
Im using the below statement in one of my programs and Im getting the below error. Please help me to rectify this error.

Statement:
COPY ZRCXML51 REPLACING
THE-FIELD-TAG BY CUST-PHONE6-TAG
THE-FIXED-STRING BY PHONE-NUMBER(6) OF EXTRACT-RECORD.

Error:
THE "COPY" STATEMENT WAS INVALID. EXPECTED "BY", BUT FOUND "EXTRACT-RECORD". THE STATEMENT WAS DISCARDED.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Jun 18, 2008 5:10 am    Post subject: Reply with quote

Quote:

THE-FIXED-STRING BY PHONE-NUMBER(6) OF EXTRACT-RECORD


what are you trying to do with this clause?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
sankar narayanan
Beginner


Joined: 16 Oct 2007
Posts: 29
Topics: 12

PostPosted: Wed Jun 18, 2008 5:38 am    Post subject: Reply with quote

the FIXED-STRING field is in the ZRCXML51 and im replacing it by PHONE-NUMBER(6) of the extract-record copybook. the phone number is like below in the copybook
15 TELEPHONE-NUMBER-DATA.
20 PHONE-NUMBER-DATA OCCURS 6 TIMES.
25 PHONE-TYPE-CODE PIC X.
25 PHONE-AVAILABILITY-CODE
PIC X.
25 PHONE-NUMBER.
30 PHONE-AREA-CODE PIC X(3).
30 PHONE-PREFIX PIC X(3).
30 PHONE-SUFFIX PIC X(4).
30 PHONE-EXTENSION PIC X(7)
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Wed Jun 18, 2008 7:20 am    Post subject: Reply with quote

I think you have a misunderstanding of copy replacing, this is just a compile time change of field names it doesn't have anything to do with the data.
Back to top
View user's profile Send private message
sankar narayanan
Beginner


Joined: 16 Oct 2007
Posts: 29
Topics: 12

PostPosted: Wed Jun 18, 2008 7:45 am    Post subject: Reply with quote

yes i too agree on that but then why im getting an error when the statement is correct. please help me on this.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Wed Jun 18, 2008 7:48 am    Post subject: Reply with quote

The statement is NOT correct - you have phone-numbers(6) followed by OF. OF is not part of the syntax of the COPY directive.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
sankar narayanan
Beginner


Joined: 16 Oct 2007
Posts: 29
Topics: 12

PostPosted: Wed Jun 18, 2008 8:08 am    Post subject: Reply with quote

Agreed Nic but what happens here is that there is also an existing code present as below and it is working fine without getting caught while compiling

COPY ZRCXML56 REPLACING
THE-FIELD-TAG BY CUST-DOB-DATE-TAG
THE-INTEGER-VALUE BY CUST-DOB-DATE OF EXTRACT-RECORD.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Wed Jun 18, 2008 8:12 am    Post subject: Reply with quote

It is probably the (6) that is putting it off - I do not know if you can supply table dimensions in a REPLACING clause. Try just the PHONE-NUMBER.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group