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

Issue with MOVE Z'String-name' TO WS-Variable


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

New User


Joined: 27 Jun 2006
Posts: 9

PostPosted: Mon Jun 27, 2011 6:47 pm
Reply with quote

Hi All,
Getting an error in cobol cics program for the move statement.

Code:
MOVE Z'PROG1' TO WS-PROGRAM-NAME. 


Compiler messages -
A BLANK WAS MISSING BEFORE CHARACTER "'" IN COLUMN 18. A BLANK WAS ASSUMED.

"Z" WAS NOT DEFINED AS A DATA-NAME. THE STATEMENT WAS DISCARDED.

THE "MOVE" STATEMENT WAS INVALID. EXPECTED "TO", BUT FOUND "'PROG1'
THE STATEMENT WAS DISCARDED.


This is a part of existing code which is running fine in production region but when trying to compile the same in test region facing above mentioned problem. I never have used MOVE Z'PROG1' statement till now & also don't have any clues around this.

Will highly appreciate if someone could please elaborate why this move statement(with Z'string') is used & what could be the workaround for above issue?

TIA
Shailesh
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 27, 2011 7:01 pm
Reply with quote

Quote:
This is a part of existing code which is running fine in production region but when trying to compile the same in test region facing above mentioned problem.


clarify the above sentences, is it running before, or after the modification ???
if the program compiles ASIS in production,
ask Your support to provide the same facilities also in test

the construct Z'<something>' is a null terminated literal a la "C/c++"

review the cobol manuals using the proper version here

www-03.ibm.com/systems/z/os/zos/bkserv/zappls2.html

and have Your support verify the cobol compiler being used

but sincerely I do not remember the need for null terminated strings for cics entities icon_eek.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 27, 2011 7:17 pm
Reply with quote

If you click on the Manuals link at the top of this page, find the Enterprise COBOL Language Reference manual, and open it -- read section 1.3.9.1.4 on null-terminated strings.
Back to top
View user's profile Send private message
shailesh_do

New User


Joined: 27 Jun 2006
Posts: 9

PostPosted: Tue Jul 05, 2011 4:36 pm
Reply with quote

Thanks Robert & Enrico for your kind suggestions.

Support team at our end have solved this issue, as of now unsure what exactly they did but its all fine now.

Will definitely update what was the exact issue once we hear back from support team.

Cheers.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Jul 05, 2011 5:38 pm
Reply with quote

Just out of curiosity,
If you still have the previous compile listing (the one with the errors), you should check which version of COBOL was used and compare with the version on the second listing (the one without errors).
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top