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
 

 

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: 10256
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: 8055
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: 1228
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm


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