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

IGYPS2079-S EXPECTED A VERB OR "NEXT SENTENCE"


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

Active User


Joined: 17 Mar 2006
Posts: 174
Location: Bangalore

PostPosted: Sun Feb 11, 2007 12:32 pm
Reply with quote

Hi,

I am getting the error (EXPECTED A VERB OR "NEXT SENTENCE", BUT FOUND "WS-AN485-ANN-REV-PAID". THE STATEMENT WAS DISCARDED.)

in the code

SET WS-NOT-DSL TO TRUE.

IF WS-AN440-PROD-CLASS-CD = 'ABCD'
SET WS-DSL TO TRUE
END-IF.

IF WS-DSL AND WS-PAY-INDICATOR = 'U'
WS-AN485-ANN-REV-PAID = WS-AN440-TCV-REV-PAID -
:WS-RENEWAL-REVENUE
WS-AN485-ANN-REV-RECOUP = WS-AN440-TCV-REV-RECOUP +
:WS-RENEWAL-REVENUE
END-IF.


can anyone help regarding this....
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sun Feb 11, 2007 3:25 pm
Reply with quote

shrivatsa wrote:
I am getting the error (EXPECTED A VERB OR "NEXT SENTENCE", BUT FOUND "WS-AN485-ANN-REV-PAID". THE STATEMENT WAS DISCARDED.)
in the code
Code:
SET WS-NOT-DSL TO TRUE.                               
IF WS-AN440-PROD-CLASS-CD  = 'ABCD'                 
   SET WS-DSL TO TRUE                                 
END-IF.                                               
                                                     
IF WS-DSL AND WS-PAY-INDICATOR = 'U'                 
   WS-AN485-ANN-REV-PAID = WS-AN440-TCV-REV-PAID -   
                           :WS-RENEWAL-REVENUE       
   WS-AN485-ANN-REV-RECOUP = WS-AN440-TCV-REV-RECOUP +
                           :WS-RENEWAL-REVENUE       
END-IF.                                               

You need a verb, either
COMPUTE WS-AN485-ANN-REV-PAID = WS-AN440-TCV-REV-PAID - :WS-RENEWAL-REVENUE
or
SUBTRACT :WS-RENEWAL-REVENUE from WS-AN440-TCV-REV-PAID
Back to top
View user's profile Send private message
arindam111

New User


Joined: 29 Nov 2006
Posts: 27
Location: India

PostPosted: Mon Feb 12, 2007 11:37 am
Reply with quote

Add a THEN after IF, then add a COMPUTE
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Mon Feb 12, 2007 10:48 pm
Reply with quote

Also,

:WS-RENEWAL-REVENUE is not a legitimate working storage name. Working storage variables starting with ':' are used in the DB2 pre-compiler.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Feb 12, 2007 11:47 pm
Reply with quote

Dave,

I think the ":" has something to do with host variables....???

Bill
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Feb 13, 2007 2:14 am
Reply with quote

Bill,

Correct, SQL variables starting with ':' are host variables to DB2. But are not valid variable names for COBOL.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Feb 13, 2007 2:16 am
Reply with quote

I kinda saw that too, but, what he heck....Learn sumpt'n every day...thanks for point'n it out... icon_lol.gif
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 PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
No new posts RABBIT HOLE NEEDED - "Live"... All Other Mainframe Topics 0
No new posts Using PARM=('JPn"&SYMBOL&quo... DFSORT/ICETOOL 2
No new posts Syncsort "Y2C" Function SYNCSORT 1
Search our Forums:

Back to Top