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
 

 

IGYPS2079-S EXPECTED A VERB OR "NEXT SENTENCE"

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Sun Feb 11, 2007 12:32 pm    Post subject: IGYPS2079-S EXPECTED A VERB OR "NEXT SENTENCE"
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: 3158
Location: Tucson AZ

PostPosted: Sun Feb 11, 2007 3:25 pm    Post subject: Re: IGYPS2079-S EXPECTED A VERB OR "NEXT SENTENCE&quo
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    Post subject: Re: IGYPS2079-S EXPECTED A VERB OR "NEXT SENTENCE&quo
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    Post subject: Re: IGYPS2079-S EXPECTED A VERB OR "NEXT SENTENCE&quo
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: 3158
Location: Tucson AZ

PostPosted: Mon Feb 12, 2007 11:47 pm    Post subject:
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    Post subject: Re: IGYPS2079-S EXPECTED A VERB OR "NEXT SENTENCE&quo
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: 3158
Location: Tucson AZ

PostPosted: Tue Feb 13, 2007 2:16 am    Post subject:
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    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 READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm


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