View previous topic :: View next topic
|
Author |
Message |
shailesh_do
New User
Joined: 27 Jun 2006 Posts: 9
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
shailesh_do
New User
Joined: 27 Jun 2006 Posts: 9
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
|