I am developing an application to control the equipment of the company, I can generate a log of the equipment with all the information related to the equipment, however this file is not tabulated, example below a few lines:
SET SYS:SYSDESC="SQL01ALD", SYSOBJECTID="SQL01ALD", SYSSERVICES="UMTS";
ADD URNCBASIC:SQLID=490, NSAP="H'450551310008501F000000000000000000000000";
ADD UCNOPERATOR:CNOPINDEX=0, MCC="724", MNC="31", OPERATORTYPE=PRIM;
ADD OPC:SPX=0, SPDF=WNF, SPC=16360, NAME="SQL01ALD";
ADD N7DPC:DPX=1, SPDF=WNF, NAME="MSS68ALD", DPCT=IUCS_RANAP;
ADD N7DPC:DPX=2, SPDF=WNF, NAME="MGW04ALD", DPCT=IUCS_ALCAP;
ADD N7DPC:DPX=3, SPDF=WNF, NAME="SQL01ALD";
ADD N7DPC:DPX=4, SPDF=WNF, NAME="SQL01FLZ";
ADD N7DPC:DPX=5, SPDF=WNF, NAME="SQL02ALD";
The basic intention is to take a field as a reference, for example the field SYSDESC="SQL01ALD"
copy only the SQL01ALD
to the database.
For the logic of writing to the database, I thought of looping with while
by taking the file and writing to mysql
.
The X of the question is how to get the field I want.