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

Print out all lines with 'IBM' compile message


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
emir_soko

New User


Joined: 10 Mar 2022
Posts: 8
Location: Germany

PostPosted: Mon Mar 14, 2022 9:04 pm
Reply with quote

Hey guys, I am making this program in rexx in which I allocated specific ds with mbr, I read all data to stem and now I have to print out those error warnings and severe messages that compiler returns.
Data is huge eg 5-10k of lines but compiler messages are somewhere in the middle and they all start with IBM????I (e.g. • IBM1043I I)
How can I exclude all lines that are not interesting for me?

Thank you for any help

Code:

 /*REXX*/                                                                       
 INPUT = 'DATASET(MEMBER)'                   
 ADDRESS TSO                                                     
 "ALLOC F(INPUT) DA('"INPUT"') SHR REUS"                         
  RETC = RC                                                     
  IF RETC > 0 THEN DO                                           
    CALL ENDE( 0 "ERROR ON ALLOC INPUT="INPUT" RETC = "RETC )   
  END                                                           
                                                                 
 "EXECIO * DISKR INPUT ( FINIS STEM LINE."                       
 SAY RC                                                         
 SAY INLINE.0                                                   
 DO I = 1 TO INLINE.0                                           
 SAY I INLINE.I                                                 
 END
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 1489

PostPosted: Mon Mar 14, 2022 10:09 pm
Reply with quote

You must present here the exact copies of all involved stuff:

1) your code (already done).
2) (a fragment of) your input data.
3) (a fragment of) your output data.
4) all error messages exactly as they are, and wherever they have appeared.

In order to exclude unneeded lines, you must understand exactly: what needs to be excluded? Then use the REXX IF statement to verify if a particular line needs to be included/excluded, and then execute/skip the corresponding SAY statement.

I would also recommend you to train yourself in accurate coding of the program, including proper code alignment, using spaces to emphasize the code elements/keywords/separators, use appropriate variable naming convention, etc. etc. etc.
Back to top
View user's profile Send private message
emir_soko

New User


Joined: 10 Mar 2022
Posts: 8
Location: Germany

PostPosted: Mon Mar 14, 2022 10:15 pm
Reply with quote

First of all here is only fragment of input there is much more but focus is on those W messages,



Code:

15655-PL5  IBM(R) Enterprise PL/I for z/OS       /*** TAISII - P1KDI40
- SQL Preprocessor Messages                                           
0 Message       Line.File Message Description                         
0 IBM3250I W     281.0    DSNH204I DSNHANAL LINE 281 COL 1  STATEMENT 
                          REFERENCES UNDECLARED TABLE "TZT"."VTZAAI"   
  IBM3250I W     296.0    DSNH204I DSNHANAL LINE 296 COL 1  STATEMENT 
                          REFERENCES UNDECLARED TABLE "TZT"."VTZAAI"   
  IBM3250I W     324.0    DSNH206I DSNHANAL LINE 324 COL 1  STATEMENT 
                          REFERENCES COLUMN "AI"."AI", WHICH IS NOT DEC
                          IN THE SPECIFIED TABLE(S)                   
  IBM3250I W     324.0    DSNH206I DSNHANAL LINE 324 COL 1  STATEMENT 
                          REFERENCES COLUMN "AI"."ZI", WHICH IS NOT DEC
                          IN THE SPECIFIED TABLE(S)                   
  IBM3250I W     324.0    DSNH206I DSNHANAL LINE 324 COL 1  STATEMENT 
                          REFERENCES COLUMN "AI"."SNR", WHICH IS NOT DE
                          IN THE SPECIFIED TABLE(S)                   
  IBM3250I W     324.0    DSNH206I DSNHANAL LINE 324 COL 1  STATEMENT 
                          REFERENCES COLUMN "AI"."LFEAI", WHICH IS NOT
                          DECLARED IN THE SPECIFIED TABLE(S)           
  IBM3250I W     324.0    DSNH206I DSNHANAL LINE 324 COL 1  STATEMENT 
                          REFERENCES COLUMN "AI"."LFEAI", WHICH IS NOT
                          DECLARED IN THE SPECIFIED TABLE(S)           
  IBM3250I W     339.0    DSNH206I DSNHANAL LINE 339 COL 1  STATEMENT 
                          REFERENCES COLUMN "AI"."AI", WHICH IS NOT DEC
                          IN THE SPECIFIED TABLE(S)                   
  IBM3250I W     339.0    DSNH206I DSNHANAL LINE 339 COL 1  STATEMENT 
                          REFERENCES COLUMN "AI"."ZI", WHICH IS NOT DEC



and the output is basically the whole member printed in output so I have to force close it using "HI"
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 1489

PostPosted: Mon Mar 14, 2022 10:19 pm
Reply with quote

Code:
 . . . . . . . . .
 Parse Var INLINE.I =2 TextLine
 Parse Var TextLine  MsgID MsgType .
 If Left( MsgID, 3) = 'IBM' ,
  & Right( MsgID, 1) = 'I' ,
  & MsgType = 'W' Then Iterate I /* skip unneeded line */
. . . . . . . . . .
   


I recommend you to train yourself in detection the "continuation lines" of those error/warning messages. (To allow you doing a part of your job by yourself).

This depends on the samples for the rest of your input data, which you decided not to show to the forum. Anyway, nobody can do it except yourself.

P.S.
It might be easier to detect the needed lines, rather than unneeded ones.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 590
Location: Denmark

PostPosted: Tue Mar 15, 2022 2:30 am
Reply with quote

Even assuming that you have an internal procedure 'ENDE', you must change the following
CALL ENDE( 0 "ERROR ON ALLOC INPUT="INPUT" RETC = "RETC )
to
CALL ENDE 0 "ERROR ON ALLOC INPUT="INPUT" RETC = "RETC
Paranthesis are for function invocations.
And you dont need the statement in a DO/END block so you really only should have:
IF RC>0 THEN CALL ENDE 0 'ERROR ON ALLOC INPUT='INPUT 'RC="rc
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2342
Location: Silicon Valley

PostPosted: Tue Mar 15, 2022 4:31 am
Reply with quote

You have only shown a part of the file. From what I see, I would do it differently. Instead of searching for IBM*****, I would search for "- SQL Preprocessor Messages" and then print any lines that follow. But you did show us what follows that section. I presume that there is some kind of section title that when you find it will stop the printing of lines.

The section that you showed only has errors in SQL statements.
After that section, there might be other IBM**** messages related to PLI errors.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1153
Location: Dublin, Ireland

PostPosted: Tue Mar 15, 2022 1:24 pm
Reply with quote

This thread should be moved to the Beginners Forum.

Garry.
Back to top
View user's profile Send private message
prino

Senior Member


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

PostPosted: Wed Mar 16, 2022 11:13 am
Reply with quote

There's this utility called SuperC...
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 1489

PostPosted: Wed Mar 16, 2022 6:15 pm
Reply with quote

prino wrote:
There's this utility called SuperC...

Quote:
We're not looking for easy ways
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts is there a way to print time in HH:MM... SYNCSORT 12
No new posts Removing date values lines/records fr... SYNCSORT 2
No new posts How to get the message id thats trigg... Java & MQSeries 0
No new posts VB file copy COBOL program gives erro... COBOL Programming 3
No new posts JCL for pl1 db2 precompile, compile a... JCL & VSAM 4
Search our Forums:

Back to Top