How to read a tuple from substrings of all lines of a file

written by Trailsuender

Hi

OK, this works fine:

Q: tuple string item 0 of (concatenation ", " of substrings separated by “;” of line 1 of file “/tmp/TEM_sqlplus_result.txt”)

A: 2013-12-20 05:12:07

T: 432

Q: tuple string item 1 of (concatenation ", " of substrings separated by “;” of line 1 of file “/tmp/TEM_sqlplus_result.txt”)

A: vsulibe3orat10

T: 500

Q: tuple string item 2 of (concatenation ", " of substrings separated by “;” of line 1 of file “/tmp/TEM_sqlplus_result.txt”)

A: SQL*Plus: Release 11.2.0.2.0 Production

T: 848

But if I want to do it for all lines, I get an error, what do I make wrong?

Q: tuple string item 0 of (concatenation “,” of substrings separated by “;” of lines of file “/tmp/TEM_sqlplus_result.txt”)

E: Singular expression refers to nonexistent object.

T: 731

written by jgstew

Try this by itself:

(concatenation “,” of substrings separated by “;” of lines of file “/tmp/TEM_sqlplus_result.txt”)

Try this instead:

((concatenation “,” of substrings separated by “;” of it) of lines of file “/tmp/TEM_sqlplus_result.txt”)

Then try:

tuple string items 0 of ((concatenation “,” of substrings separated by “;” of it) of lines of file “/tmp/TEM_sqlplus_result.txt”)

(imported comment written by Trailsuender)

Hi jgstew

Thanks for help, but I do not really get yet what I want: to load each value of the “;” separated columns in an own property of an analysis.

Base is a textfile containing something like this:

2014-01-10 07:01:11;myhostname;SQL*Plus: Release 11.2.0.2.0 Production;/u00/app/oracle/product/11.2.0.2.0.A/bin/sqlplus: 64-bit XCOFF executable or object module not stripped
2014-01-10 07:01:11;myhostname;SQL*Plus: Release 11.2.0.3.0 Production;/u00/app/oracle/product/11.2.0.3.0.E/bin/sqlplus: 64-bit XCOFF executable or object module not stripped
2014-01-10 07:01:11;myhostname;SQL*Plus: Release 11.2.0.3.0 Production;/u00/app/oracle/product/11.2.0.3.0.G/bin/sqlplus: 64-bit XCOFF executable or object module not stripped

Target is to read this out for a csv sheet.

Each tested server may have one to many Oracle versions installed.

This delivers nothing ecxept “T: 248”:

Q: tuple string items 0 of ((concatenation "," of substrings separated by ";" of it) of lines of file "/tmp/TEM_sqlplus_result.txt")
T: 248

and this results in an error (item instead of items):

Q: tuple string item 0 of ((concatenation "," of substrings separated by ";" of it) of lines of file "/tmp/TEM_sqlplus_result.txt")
E: Singular expression refers to nonexistent object.
T: 358

As soon you replace e.g. the “of line 1” with “of lines” you’ll get the error message.

And sorry for having no clue of relevance language, I found no usable full documentation on the IBM pages nor on the remaining bigfix pages. There are only “snap shots” available and no full compendium (usable for self studies).

1 Like

written by jgstew

Now I think I better understand what you are trying to do. Try this:

(tuple string item 0 of concatenation ", " of substrings separated by ";" of it) of lines of file "/tmp/TEM_sqlplus_result.txt"

Relevance is not easy to learn and IBM’s documentation is poor and hard to find.

I highly recommend searching through
http://bigfix.me/
for examples. I find this the best way to learn.

Here is the online inspector reference:

http://support.bigfix.com/inspectors/Action%20Objects_Any.html

Here is the inspector search:

http://support.bigfix.com/cgi-bin/inspectorsearch/inspector_search.cgi

Here is an inspector guide on a community website:

http://bigfix.me/inspectorguide

Somewhere there are PDFs of all of the inspectors as well, but I always have trouble finding them.

Here is a helpful, but out of date one:
http://support.bigfix.com/fixlet/documents/Core%20Inspectors%2081_110714.pdf

1 Like

written by jgstew

Also, you can find the majority of my work here:
http://bigfix.me/site/details/30?sc=true

written by VimalBagmar

tuple string

items

1

of
(concatenation

", "

of
substrings separated by

“:”

of
(
it

as
string))

of
lines

of
file

“C:\test.txt” Works , make sure there is space after , following Concatenation.