Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Issue with MOVE Z'String-name' TO WS-Variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Issue with MOVE Z'String-name' TO WS-Variable
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Mon Jun 27, 2011 7:01 pm    Post subject: Reply to: Issue with MOVE Z'String-name' TO WS-Variable - He
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

http://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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Mon Jun 27, 2011 7:17 pm    Post subject:
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    Post subject: Thanks !
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: 1243
Location: Israel

PostPosted: Tue Jul 05, 2011 5:38 pm    Post subject: Reply to: Issue with MOVE Z'String-name' TO WS-Variable - He
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    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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 3 Sat Oct 14, 2017 2:29 am
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us