First time here?
Back again?


 
 

How do I remove extra PPRINT statements created by Catia

CATEGORY: PROGRAMMING
TYPE: MACRO
IMS VERSION: ALL
PLATFORM: ALL

To remove the Catia PPRINT statement that start with the word OPERATION, you need to split the string read after the PPRINT and check for the first word. Then only output it if it is different from "OPERATION"

Here is a modified PPRINT macro that illustrates this situation:
(there is a space character in between the 2 double quotes in the SPLIT command)

PPRINT/*
FIRST_WORD = 0
* Menu-generated code start (do not remove this line)
IF (GLOBAL.COMMENT_ONOFF = 1)
IF (GLOBAL.COMMENT_WSEQNO)
CALL(SEQNOON/)
ELSE
SEQNO(OFF)
ENDIF
IF (GLOBAL.COMMENT_BLANK1)
OUTPUT(" ",NEWLIN)
ENDIF
IF ( GLOBAL.COMMENT_UPERCASE )
S = UCASE (CLDATAN.1 )
ELSE
S = CLDATAN.1
ENDIF
* Check for OPERATION as first word
SPLIT(" ",S,FIRST_WORD)
IF(FIRST_WORD <> "OPERATION")
OUTPUT(GLOBAL.COMMENT_PREFIX,S, GLOBAL.COMMENT_SUFFIX, NEWLIN)
IF (GLOBAL.COMMENT_BLANK2)
OUTPUT(" ",NEWLIN)
ENDIF
ENDIF
* End of Check
IF (GLOBAL.COMMENT_RSEQNO)
CALL(SEQNOON/)
ELSE
SEQNO(OFF)
ENDIF
ENDIF
* Menu-generated code end (do not remove this line)
RETURN

Back to Frequently Asked Questions