Home create a temporary variable in db2/400 (v5R4) within a RUNSQLSTM source file member?
Reply: 0

create a temporary variable in db2/400 (v5R4) within a RUNSQLSTM source file member?

user520
1#
user520 Published in April 25, 2018, 12:34 pm

Can I create a temporary variable in db2/400 (v5R4) within a RUNSQLSTM source file member? Maybe something like this?

CREATE VARIABLE myVar1 INT DEFAULT (RAND() *100)    
CREATE VARIABLE myVar2 INT DEFAULT (RAND() *100)    
CREATE VARIABLE myVar3 INT DEFAULT (RAND() *100)    

INSERT INTO file1 VALUES(myVar1, myVar2, myVar3)
INSERT INTO file1 VALUES(myVar1, myVar2, myVar3)
etc... 

The goal is to quickly generate some random test data. Example above is simplified.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 1.090697 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO