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

EVENT type cannot be declared in Enterprise PL/1?


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Tue Nov 24, 2009 2:43 pm
Reply with quote

I'm now working on the version up from MVS PL/1 to Enterprise PL/1.
Program which includes the following declare part can be successfully compiled by SCLM under MVS PL/1 environment.
Code:
DCL 1 BRAPRZS1         BASED(SPTZS1), 
      2 #GINPARM,                     
        3 #SPTOACS     POINTER,       
        3 #TMODE       BIT  ( 1),     
                                       
                                       
        3 #CREPLY      CHAR (30),     
        3 #CEVENT      EVENT,         
        3 #CRKS0,                     
          4 #CAPMJ     CHAR ( 4),     
          4 #CAPMN     CHAR ( 4),     
        3 #CAPLNAME    CHAR ( 8),     
      2 #GOTPARM,                     
        3 #CRETCD      CHAR ( 2),     

But in Enterprise PL/1 environment, error occured and the error message is as follows:
Code:
0 Message       Line.File Message Description                                 
0 IBM2021I S     193.0    There is no element named #CAPMJ in the structure   
                          BRAPRZS1.                                           
  IBM2021I S     194.0    There is no element named #CAPMN in the structure   
                          BRAPRZS1.                                           
  IBM1352I E      61.0    The statement element 3 is invalid. The statement   
                          will be ignored.                                     
  IBM1122I W      60.0    Missing ; assumed before EVENT.                     
  IBM1216I W      60.0    The structure member #CEVENT is declared without any
                          data attributes. A level number may be incorrect.   
- File Reference Table                                                         


It's obviously that type EVENT cannot be declared in Enterprise PL/1 program.


Can anybody please provide me more detailed information on this and an alternative to EVENT if possible.

Thank you very much!
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Tue Nov 24, 2009 3:00 pm
Reply with quote

The manuals can be found here.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Nov 24, 2009 5:26 pm
Reply with quote

There is a link to the manuals at the top of this page. If you click on it, go down to the Enterprise PL/I manuals, and bring up the Programming Guide, you can go to the Glossary and find:
Quote:
event. An activity in a program whose status and completion can be determined from an associated event variable.

event variable. A variable with the EVENT attribute that can be associated with an event. Its value indicates whether the action has been completed and the status of the completion.
So it sure sounds like Enterprise PL/I supports EVENT variables.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Tue Nov 24, 2009 7:19 pm
Reply with quote

Robert Sample wrote:
So it sure sounds like Enterprise PL/I supports EVENT variables.


Yes, from the manual, we can see Enterprise PL/1 supports EVENT variables.

But from the compile log, we can judge that it's obviously that it's where EVENT variable was defined that went wrong.
Code:
IBM1216I W      60.0    The structure member #CEVENT is declared without any
                          data attributes. A level number may be incorrect.


Can you provide me some suggestions on this ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Nov 24, 2009 7:56 pm
Reply with quote

Although I no longer have access to the PL/I compiler, the manuals link at the top of the page has the Enterprise PL/I Programming Guide. Chapter 5.1 is about using PL/I with XML. Chapter 5.1.7 is a sample program, provided by IBM, which includes EVENT variables. Having code from IBM as a starting point is usually enough to get through the process.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Tue Nov 24, 2009 9:24 pm
Reply with quote

Here...

Seems that EP never supported EVENT, which is very well possible as even the V3.4 manual has stopped mentioning EVENT and TASK anywhere in the index.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Nov 24, 2009 10:07 pm
Reply with quote

I believe that Mr. Prins is correct; event variables are associated with multi-tasking, which facility is no longer supported by PL/I. Enterprise PL/I supports multi-threading, but I do not think that we have enough information to say if that would be functionally equivalent; at a minimum, I think that some business and system analysis, not just a mechanical conversion, needs to be applied to dejunzhu's case.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Tue Nov 24, 2009 10:42 pm
Reply with quote

This is the key error message:

Code:
IBM1352I E      61.0    The statement element 3 is invalid. The statement
                          will be ignored.


It appears even for a program with just

Code:
DCL E EVENT;


In other words EPLI does not support EVENT variables and Peter Elderon needs to do something about this rather inappropriate message, I'll inform him about it.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Tue Nov 24, 2009 11:26 pm
Reply with quote

I informed Peter Elderon, IBM's lead PL/I developer about this, his reply:

Peter Elderon wrote:
We'd probably be better off having the parser accept EVENT and then rejecting it later - when we could produce a better message


Guess it will appear in the APAR list in the (near) future...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Nov 24, 2009 11:46 pm
Reply with quote

deleted my previous posts because of a pebcak - sorry for the inconvenience
now the problem has been solved ( the pebcak I mean ) icon_biggrin.gif

From the messages and codes manual it looks like a generic parser error
since the EVENT token is not recognized
the compiler behaves as if You had declared DCL somevar SOMETYPE ;

and here is the test

Code:
5655-H31  IBM(R) Enterprise PL/I for z/OS       TEST:PROCEDURE OPTIONS(MA
Compiler Source
Line.File
1.0      TEST:PROCEDURE OPTIONS(MAIN);
2.0      DCL 1 SOMESTRUCT ,
3.0          2 VAR1 FIXED BIN(31) ,
4.0          2 VAR2 SOMEVARTYPE ,
5.0          2 VAR3 FIXED BIN(31);
6.0      END ;
5655-H31  IBM(R) Enterprise PL/I for z/OS       TEST:PROCEDURE OPTIONS(MA
Compiler Messages
Message       Line.File Message Description
IBM1352I E       5.0    The statement element 2 is invalid. The statement
will be ignored.
IBM1122I W       4.0    Missing ; assumed before SOMEVARTYPE.
IBM1216I W       4.0    The structure member VAR2 is declared without any
data attributes. A level number may be incorrect.


looks like there is on our side a psychological dependency on the fact that EVENT attribute had a specific meaning,
since the support has been dropped the compiler behavior is to flag it as any other arbitrary character string
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Wed Nov 25, 2009 6:07 am
Reply with quote

If EVENT type , which was supported by MVS PL/1, is no longer supported by Enterprise PL/1, the version up work of PL/1 from MVS to Enterprise becomes more complicated and troublesome...

But on the other hand, I suppose IBM should not have brought us so much trouble, and there must be some easier way to accomplish this task.

Keep investigating....
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Wed Nov 25, 2009 7:54 am
Reply with quote

I'm sorry, I forgot to tell you the PL/1 version.
From compilation log, I can get the following version information:

Code:
15655-H31  IBM(R) Enterprise PL/I for z/OS       V3.R6.M0 (Built:20080229)     
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Nov 25, 2009 7:38 pm
Reply with quote

dejunzhu wrote:
If EVENT type , which was supported by MVS PL/1, is no longer supported by Enterprise PL/1, the version up work of PL/1 from MVS to Enterprise becomes more complicated and troublesome...

Does the program in fact use multi-tasking?
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Wed Nov 25, 2009 10:53 pm
Reply with quote

dejunzhu wrote:
I'm sorry, I forgot to tell you the PL/1 version.
From compilation log, I can get the following version information:

Code:
15655-H31  IBM(R) Enterprise PL/I for z/OS       V3.R6.M0 (Built:20080229)


Slightly of-topic and it won't solve your problem, but you are some 16 months behind with patches, current build of V3.6 is 20090618 (and of course V3.9 is now available!)

Robert
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Thu Nov 26, 2009 7:03 am
Reply with quote

Akatsukami wrote:

Does the program in fact use multi-tasking?


I did not exam the function of the program, but the program is currently running fine, and the program is too long to check its function.

Now, I add library: DCP.DCPLIB (maybe it's local customized from MVS PL/1 compile library)to LINK definition of SCLM, EVENT type has been successfully compiled.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Nov 26, 2009 2:17 pm
Reply with quote

glad that Your issue was solved,
I got curious and googled for "dcp.dcplib"
and I found only two references ..
this thread and another thread in these forums where "dcp.dcplib" was used as a sort steplib for a pgm=sortx

looks like there is a lot of mangling going on over there icon_biggrin.gif
(*) mangling ==> obscure and complicated handling of things

if You have time to answer
what is the difference between the two compilations ???
( headers and info about the compiling program )
how the variable is defined in the cross reference

another speculation could be that that the EVENT keyword has been substitued somehow
with a PLI macro defining the variable in some different way
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Nov 27, 2009 1:42 pm
Reply with quote

I'm using SCLM when I compile pl/1 program.
that is, in my version up work from MVS PL/1 to Enterprise PL/1, what I have changed, was the compile options and compile libraries.

I have no independent program to compile Enterprise PL/1 program.

After some investigation, I did not find somewhere a macro was defined to EVEN.

I'm also confused about this result.
Can library used in MVS PL/1 be used together with Enterprise pl/1?
Even if it can be successfully compiled, who can guarantee that EVENT type can run without any problems under MVS PL/1 environment?
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Nov 27, 2009 1:48 pm
Reply with quote

By the way, library: DCP.DCPLIB is locally customized.
In this library, I cannot see the source, but unrecognized codes like LMOD.
And besides, there is no member named EVENT.

This makes me more confused.
How can this library make the compilation of EVENT successful?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Nov 27, 2009 1:56 pm
Reply with quote

Quote:
This makes me more confused.
How can this library make the compilation of EVENT successful?


You are not the only one confused at this point icon_biggrin.gif
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Thu Dec 24, 2009 1:39 pm
Reply with quote

I made a mistake.
I tried to verify if EVENT type argument is supported by Enterprise PL/1 with the following code:
Code:
0TEST : PROC(PARM);           
 DCL 1 SOMESTRUCT ,           
       2 VAR1 FIXED BIN(31) , 
       2 VAR2 EVENT ,         
       2 VAR3 FIXED BIN(31);   
 END TEST ;   


The return code of SCLM is 0.
but when I look into the compile log, I found it was not compiled successfully.
Code:
15655-H31  IBM(R) Enterprise PL/I for z/OS       TEST : PROC(PARM);         
- Compiler Messages                                                         
0 Message       Line.File Message Description                               
0 IBM1352I E       5.0    The statement element 2 is invalid. The statement 
                          will be ignored.                                   
  IBM1122I W       4.0    Missing ; assumed before EVENT.                   
  IBM1216I W       4.0    The structure member VAR2 is declared without any 
                          data attributes. A level number may be incorrect. 
- File Reference Table                                                       
0   File    Included From  Name                                             
0      0                   SYS09338.T175157.RA000.EV6954BT.SYSIN.H01         
- Component    Return Code    Messages (Total/Suppressed)    Time           
0 MACRO            0                0  /  0                   0 secs         
  Compiler         8                5  /  2                   1 secs       


I must find an alternative to EVENT type,
What should I do...
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Thu Dec 24, 2009 2:10 pm
Reply with quote

On the previous page of this topic you were already told that Enterprise PL/I no longer supports EVENT variables and that Mr PL/I, aka Peter Elderon, will at some stage, change the error message to indicate this.

There is no replacement for EVENT. You might be able to do something with EP's multi-threading facilities.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Duplicate transid's declared using CEDA CICS 3
No new posts DB2 Event passed to the Application P... DB2 1
No new posts SMF record type 30 JCL & VSAM 8
No new posts Selective extract of multi-record-typ... SYNCSORT 4
No new posts JSON PARSE in Enterprise COBOL COBOL Programming 2
Search our Forums:

Back to Top