Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I create invalid TurboImage data on the fly for testing purposes ?

0
10 Posted

How can I create invalid TurboImage data on the fly for testing purposes ?

0
10

Let’s assume that you really don’t need a permanent dataset-resident store of bad TurboImage data. The following Warehouse script uses the FIELD() function to store bad data into a set of commonly-used TurboImage data types that are defined as script variables. These data types are subsequently tested for invalid data. 1> // or10 initialized to the value ‘check\11data’ 2> 3> define or10 : oracle raw(10) value 0x636865636B1164617461 4> print “\nfield or10 contains: “; or10 5> 6> // check for non-ascii in a character-type variable 7> 8> define x : image x10 9> setvar x = field(or10, 1, “image x10″) 10> if scrub(x, ” “) <> x 11> print “\nfailed : non-ascii data in x-type field” 12> endif 13> 14> // check for invalid format in z-type variable 15> 16> define z : image z4 17> setvar z = field(or10, 1, “image z4”) 18> try 19> setvar z = z + 0 20> recover 21> print “\nfailed : invalid zone decimal content in z-type field” 22> print “\t”; $err.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123