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: 10210
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: 7931
Location: Bellevue, IA

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: 1224
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 Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm


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