Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'LABEL ON TABLE' not occurring in Bob compilation in all situations. #338

Open
bmcpherson-srlife opened this issue Aug 14, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@bmcpherson-srlife
Copy link

Hello all,

I've noticed when tables are being generated for a project, the LABEL ON TABLE statement does not appear to be executing in all instances. I can take the same code and run it directly in the "Run SQL Scripts" utility with the expected results. However, not all code run into this issue. Below are two examples:

  1. This first one runs just fine in Bob:
CREATE OR REPLACE TABLE system_tokens FOR SYSTEM NAME systken ( 
	system_token FOR COLUMN token CHAR(32) NOT NULL DEFAULT '',
  expiration_timestamp FOR COLUMN expires TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY ( system_token )

)   

RCDFMT systkenr ; 
  
LABEL ON TABLE system_tokens 
	IS 'System Token File' ; 
  
LABEL ON COLUMN system_tokens ( 
  system_token IS 'System Token',
  expiration_timestamp  IS 'Expiration Timestamp'
) ; 
  
LABEL ON COLUMN system_tokens  ( 
  system_token TEXT IS 'System Token', 
  expiration_timestamp  TEXT IS 'Expiration Timestamp'
) ; 

However, this next one does not appear to recognize the LABEL ON TABLE. No errors were generated in the log (see further below)

CREATE OR REPLACE TABLE mea_session_tokens FOR SYSTEM NAME meaptken ( 
	agent_number         FOR COLUMN TKENAGT# NUMERIC(6, 0) NOT NULL DEFAULT 0 , 
	session_token        FOR COLUMN TKENTKEN CHAR(32) NOT NULL DEFAULT '' , 
	expiration_timestamp FOR COLUMN TKENEXP  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , 

  -- Constraints
	PRIMARY KEY( agent_number ) 
)   
	  
RCDFMT meapwtkenr ; 
  
-- Add Text to the Table
LABEL ON TABLE mea_session_tokens 
	IS 'MEA Session Token File' ; 
  
LABEL ON COLUMN mea_session_tokens ( 
  agent_number         IS 'Agent Number' , 
	session_token        IS 'Session Token' , 
	expiration_timestamp IS 'Expiration Timestamp' 
) ; 
  
LABEL ON COLUMN mea_session_tokens ( 
  agent_number         TEXT IS 'Agent Number' , 
	session_token        TEXT IS 'Session Token' , 
	expiration_timestamp TEXT IS 'Expiration Timestamp' 
) ; 

ibmi_output_log.txt

@irfanshar irfanshar self-assigned this Sep 10, 2024
@edmundreinhardt
Copy link
Member

Just curious if the -- comment is supported in RUNSQLSTM

@edmundreinhardt edmundreinhardt added the bug Something isn't working label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants