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
 

 

Error in compilation due to NOT logical operator

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
quest2008

New User


Joined: 12 Jun 2008
Posts: 22
Location: bangalore

PostPosted: Mon Aug 11, 2008 8:50 pm    Post subject: Error in compilation due to NOT logical operator
Reply with quote

Hello guys,

I am getting MAC CC =12 for the following PLI prog.

The problem is with the logical operator 'Not equal' is not supporting in the system.The compiler prog IEL0AA.

Can anybody tell me how can i handle this.


Thanks.


TEXT IN OR FOLLOWING THIS STATEMENT CONTAINS INVALID CHARACTER'LEGAL_DEPARTMENTS)'. 'IF
VERIFY (DEPT,LEGAL_DEPARTMENTS) ^' IGNORED.

STATEMENT BEGINS WITH INVALID SYNTAX. '= 0' IGNORED.

STATEMENT BEGINS WITH INVALID SYNTAX. 'THEN DO' IGNORED.

INVALID CHARACTER AFTER 'E > 6)) | (DEPT' SET TO A BLANK.

INVALID CHARACTER AFTER ''P' & DISCOUNT_CODE' SET TO A BLANK.

LABEL REFERENCED BY 'END' STATEMENT CANNOT BE MATCHED. REFERENCE IGNORED.

LOGICAL END OF PROGRAM FOUND BEFORE END OF SOURCE TEXT. STATEMENT IGNORED.

VALIDTE:PROCEDURE OPTIONS(MAIN);
DCL AMOUNT FIXED DEC(6,2);
DCL CUSTOMER# CHAR(6);
DCL DEPT CHAR(1);
DCL DISCOUNT_CODE FIXED DEC(1);
DCL ITEM# FIXED DEC(8);
DCL LEGAL_DEPARTMENTS CHAR(7) INIT('AFPWZ5*');
DCL MORE_RECORDS BIT(1) INIT ('1'B);
DCL NO BIT(1) INIT ('0'B);
DCL ORDER# CHAR(4);
DCL PRICE FIXED DEC(5,2);
DCL QUANTITY FIXED DEC(5);
DCL SAVE_CUSTOMER# CHAR(6);
DCL SAVE_ORDER# CHAR(4);
DCL SAVE_SEQUENCE# FIXED DEC(3);
DCL SEQUENCE# FIXED DEC(3);
DCL SIZE_ERROR BIT(1);
DCL TOTAL FIXED DEC(9,2);
DCL YES BIT(1) INIT('1'B);
DCL (ONCHAR,ONSOURCE,VERIFY) BUILTIN;

IF VERIFY (DEPT,LEGAL_DEPARTMENTS) ^ = 0 THEN
DO;
PUT SKIP LIST('INVALID DEPT CODE = ' || DEPT);
ERROR_RECORD = YES;
END;
IF (DEPT = 'P' & (DISCOUNT_CODE < 1 | DISCOUNT_CODE > 6)) |
(DEPT ^ = 'P' & DISCOUNT_CODE ^ = 0) THEN
DO;
PUT SKIP LIST('SEQQUENCE NUMBER ERROR','PREVIOUS SEQUENCE# = '
|| SAVE_SEQUENCE#,'NEW SEQUENCE# = ' ||
SEQUENCE#);
SAVE_SEQUENCE# = SEQUENCE#;
ERROR_RECORD = YES;
END;




Complete program.




VALIDTE:PROCEDURE OPTIONS(MAIN);
DCL AMOUNT FIXED DEC(6,2);
DCL CUSTOMER# CHAR(6);
DCL DEPT CHAR(1);
DCL DISCOUNT_CODE FIXED DEC(1);
DCL ITEM# FIXED DEC(8);
DCL LEGAL_DEPARTMENTS CHAR(7) INIT('AFPWZ5*');
DCL MORE_RECORDS BIT(1) INIT ('1'B);
DCL NO BIT(1) INIT ('0'B);
DCL ORDER# CHAR(4);
DCL PRICE FIXED DEC(5,2);
DCL QUANTITY FIXED DEC(5);
DCL SAVE_CUSTOMER# CHAR(6);
DCL SAVE_ORDER# CHAR(4);
DCL SAVE_SEQUENCE# FIXED DEC(3);
DCL SEQUENCE# FIXED DEC(3);
DCL SIZE_ERROR BIT(1);
DCL TOTAL FIXED DEC(9,2);
DCL YES BIT(1) INIT('1'B);
DCL (ONCHAR,ONSOURCE,VERIFY) BUILTIN;


ON ENDFILE(SYSIN)
MORE_RECORDS = NO;

ON SIZE
SIZE_ERROR = YES;

ON CONVERSION
BEGIN;
PUT SKIP LIST('INVALID NUMERIC FIELD = ',ONSOURCE);
ONCHAR = '0';
ERROR_RECORD = YES;
END;

CALL INITIALIZATION;

GET FILE(SYSIN) LIST(CUSTOMER#,ORDER#,SEQUENCE#,DEPT,DISCOUNT_CODE,
ITEM#,QUANTITY,PRICE);
SAVE_CUSTOMER# = CUSTOMER;
SAVE_ORDER# = ORDER#;
SAVE_SEQUENCE# = 0;

DO WHILE(MORE_RECORDS);
IF CUSTOMER# = SAVE_CUSTOMER# & ORDER# = SAVE_ORDER THEN
SAVE_SEQUENCE = SAVE_SEQUENCE + 1;
ELSE
DO;
CALL VALIDATE_TOTAL;
SAVE_CUSTOMER# = CUSTOMER;
SAVE_ORDER# = ORDER#;
SAVE_SEQUENCE# = 1;
END;

CALL VALIDATE_INPUT_FIELDS;
CALL COMPUTE_AND_TEST_AMOUNT;

IF ERROR_RECORD THEN
DO;
CALL PRINT_RECORD;
ERROR_RECORD = NO;
END;
GET FILE(SYSIN) LIST(CUSTOMER#,ORDER#,SEQUENCE#,DEPT,DISCOUNT_CODE,
ITEM#,QUANTITY,PRICE);

END;

CALL VALIDATE_TOTAL;
PUT SKIP(3) LIST ('ALL DATA HAS BEEN ROCESSED');

COMPUTE_AND_TEST_AMOUNT:PROC;
AMOUNT = PRICE * QUANTITY;
IF SIZE_ERROR THEN
DO;
PUT SKIP LIST ('PRICE * QUANTITY EXCEEDS MAXIMUM AMOUNT',
PRICE,QUANTITY);
AMOUNT = 0;
SIZE_ERROR = NO;
ERROR_RECORD = YES;
END;
TOTAL = TOTAL + AMOUNT;
END COMPUTE_AND_TEST_AMOUNT;

INITIALIZATION:PROC;
ERROR_RECORD = NO;
SIZE_ERROR = NO;
TOTAL = 0;
END INITIALIZATION;

PRINT_RECORD:PROC;

PUT SKIP LIST(CUSTOMER# || ' ' || ORDER# || ' ' ||
SEQUENCE || ' ' || DEPT || ' ' || DISCOUNT_CODE
||' ' || ITEM# || ' ' || QUANTITY || PRICE);
PUT SKIP(2) LIST((120) '*');
PUT SKIP(3);

END PRINT_RECORD;
VALIDATE_INPUT_FIELDS:PROC;

IF VERIFY (DEPT,LEGAL_DEPARTMENTS) ^ = 0 THEN
DO;
PUT SKIP LIST('INVALID DEPT CODE = ' || DEPT);
ERROR_RECORD = YES;
END;
IF (DEPT = 'P' & (DISCOUNT_CODE < 1 | DISCOUNT_CODE > 6)) |
(DEPT ^ = 'P' & DISCOUNT_CODE ^ = 0) THEN
DO;
PUT SKIP LIST('SEQQUENCE NUMBER ERROR','PREVIOUS SEQUENCE# = '
|| SAVE_SEQUENCE#,'NEW SEQUENCE# = ' ||
SEQUENCE#);
SAVE_SEQUENCE# = SEQUENCE#;
ERROR_RECORD = YES;
END;

END VALIDATE_INPUT_FIELDS;

VALIDATE_TOTAL:PROC;
IF TOTAL < 25 THEN
PUT SKIP LIST ('TOTAL IS BELOW MINIMUM', TOTAL,'CUSTOMER# = ' ||
SAVE_CUSTOMER#,'ORDER# = ' || SAVE-ORDER#);
TOTAL = 0;

END VALIDATE_TOTAL;



END VALIDTE;
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Mon Aug 11, 2008 8:56 pm    Post subject:
Reply with quote

Difficult to tell since you didn't post as CODE, but the not equal operator has to be one symbol ^= instead ^ =; get rid of the space between the ^ and the = and try again.
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


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