How to get all data in a section from profile file?

Suppose I have profile ini have a section like:
[Mysection]
k1 =v1
k2=v2
the key-value pair could be dynamically in this section. then I want to get all data in Mysection.  How can I get it in a loop for all in powerscript?

This is what you need:
integer     li_fhandle, li_rcode = 1, li_sfound = 0, li_idx = 0, li_eqpos, i
string ls_filename = 'C:\app.ini'
string ls_line, as_key[], as_val[]
string ls_section = '[General]'
// OPEN INI FILE
li_fhandle = FileOpen(ls_filename, LineMode!)
IF IsNull(li_fhandle) OR li_fhandle < 1 THEN
  // DO NOTHING
ELSE
  DO WHILE li_rcode > 0
  li_rcode = FileRead(li_fhandle, ls_line)
  IF li_rcode > 0 THEN
  IF POS(ls_section, ls_line) > 0 THEN
  li_sfound = 1
  CONTINUE
  END IF
  IF li_sfound = 0 THEN CONTINUE
  IF POS(ls_line, '[') > 0 AND POS(ls_line, ']') > 0 THEN EXIT
  li_eqpos = POS(ls_line, '=')
  li_idx++
  as_key[li_idx] = MID(ls_line, 1, li_eqpos - 1)
  as_val[li_idx] = MID(ls_line, li_eqpos + 1)
  END IF
  LOOP
END IF
FOR i = 1 TO li_idx
  messagebox('Key - Value',as_key[i] + ' = ' + as_val[i])
NEXT
// CLOSE INI FILE
IF li_fhandle > 0 THEN
   FileClose(li_fhandle)
END IF
Adapt it to your needs... you probably should make it a function.

Similar Messages

  • How to get all data from nokia to i5s

    how to get all data from nokia E71 to i5s???

    if you can put those data in your computer then add it in iTunes. your iPhone 5s should get it thru syncing.

  • How to download all data (music.contacts,apps) from iPhone to a new PC ?

    How to download all data (music.contacts,apps) from iPhone to a new PC ?
    I mean to say that I downloaded mp3 songs from websites (not from iTunes) which I synced in my iPhone 4 using ''Manaually Manage Music''.
    Now I am in my homecountry for vacations and don't have the laptop in which my iTune library is synced and I need to add more songs to my iPhone but when I put more songs to my iPhone it tells me that all current data from iPhone will be deleted.
    Please help!

    The iphone is not a backup device.  The music sync is one way - computer to iphone.  The only exception is itunes purchases.  Without syncing:  File>Transfer Purchases.
    " I need to add more songs to my iPhone but when I put more songs to my iPhone it tells me that all current data from iPhone will be deleted."
    That is correct.

  • OMB Plus : how to get all the generated messages into a text file ?

    Hello,
    I wrote an OMB TCL script and I would like to know how to get all the messages generated during the exécution into a text file.
    I tried this, but it works only for a puts command :
    set DesProjet ACT_1
    set filename [ open "c:\\temp\\INFDE_010_IMPORT_REPOSITORY_$DesProjet.log" w]
    puts "test"
    Thank you for your help

    Hello Alain, you should try the OMBLOG variable. If you set it inside OMBPlus:
    set OMBLOG c:/temp/mylog.txtthen all the OWB specific commands are logged with their output. By OWB specific I mean all those that start with OMB.
    This is more than what you see in the interface, because:
    - messages inside procedures are logged; you wouldn't see them on std.output when you call a proc
    - variables are resolved, so if you issue the command
    set my_var VERY_IMPORTANT_TABLE
    OMBDROP TABLE '$v_myvar'the log will show:
    OMBDROP TABLE 'VERY_IMPORTANT_TABLE'
    Table dropped
    and you know something is wrong... so OMBLOG is very useful to intercept all manipulations on you repository.
    If what you want instead is a dump of the screen output when you execute a script, I suggest you redirect standard output from the operating system command line. Unfortunately OMBPlus doesn't support all advanced redirection and tracing features of the TCL language.
    Hope this helps, Antonio

  • How can i retrieved data into the infocube from archived files

    hi,
    i have archived cube data and i have to load data into the cube from archived files.
    so now i want to find archived files and how to load data into the cube.
    thanks

    Hi.....
    Reloading archived data should be an exception rather than the general case, since data should be
    archived only if it is not needed in the database anymore. When the archived data target is serving also as a
    datamart to populate other data targets, Its recommend that you load the data to a copy of the original
    (archived) data target, and combine the two resulting data targets with a MultiProvider.
    In order to reload the data to a data target, you have to use the export DataSource of the archived data
    target. Therefore, you create an update rule based on the respective InfoSource (technical name 8<data
    target name>). You then trigger the upload either by using ‘Update ODS data in data target’ or by
    replicating the DataSources of the MYSELF source system and subsequently scheduling an InfoPackage
    for the respective InfoSource
    If you want to read the data for reporting or
    control purposes, you have to write a report, which reads data from the archive files sequentially.
    Alternatively, you can also use the Archiving Information System (AS). This tool enables you to define an
    InfoStructure, and create reports based on these InfoStructures. The InfoStructures define an index for
    the archive file data. At the moment, the archiving process in the BW system does not fill the
    InfoStructures during the archiving session automatically. This has to be performed manually when
    needed.
    Another way of displaying data from the archive file is by using the ‘Extractor checker’ (TCODE RSA3).
    Enter the name of the export DataSource of the respective data target (name of the data target preceded
    by ‘8’), and choose the archive files that are to be read. The extractor checker reads the selected archive
    files sequentially. Selection conditions can be entered for filtering but have to be entered in in internal
    format
    It will remain same in the change log table.
    Check this link :
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b32837f2-0c01-0010-68a3-c45f8443f01d
    Hope this helps you...........
    Regards,
    Debjani............

  • How to get all data from time maschine to windows pc?

    pls can somebody helps me, i lost my macbook and all data have on time maschine.................... need to get them out on windows pc, and second problem, downloaded itunes to windows but how i can get pictures and music from my ipod and iphone to itunes, thx for every help

    if you can put those data in your computer then add it in iTunes. your iPhone 5s should get it thru syncing.

  • How to get ALL data from ipod to new computer with itunes??

    I have a ipod touch 2nd gen. I have cd's and purchased songs on my ipod. I did use itunes on my friends computer for a number of years but now I've got windows 7 computer and i have downloaded itunes but it won't let me transfer current data on my ipod to itunes without me loosing it all. I can only access itunes at friends now. Is there any way to get all my songs, playlists, apps (with data still on it) and photos without deleting it? I am looking for the cheapest way possible. I have tried downloading copy software but it all costs money. Thanks

    See:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
    Sync Your iOS Device with a New Computer Without Losing Data - How-To Geek
    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • Tricky SQL query... how to get all data in a single query?

    create table employee_definition (def_id number, def_name varchar(50));
    insert into employee_definition values (100, 'EMAIL');
    insert into employee_definition values (200, 'MOBILE_PHONE');
    insert into employee_definition values (300, 'HOME_PHONE');
    SQL> select * from employee_definition;
        DEF_ID DEF_NAME
           100 EMAIL
           200 MOBILE_PHONE
           300 HOME_PHONE
    create table employee_data (def_id number, def_value varchar(20), emp_id number);
    insert into employee_data values (100, '[email protected]', 123);
    insert into employee_data values (200, '01232222', 123);
    insert into employee_data values (300, '5555', 123);
    insert into employee_data values (100, '[email protected]', 666);
    insert into employee_data values (200, '888', 666);
    insert into employee_data values (300, '999', 666);
    insert into employee_data values (300, '444', 777);
    SQL> select * from employee_data;
        DEF_ID DEF_VALUE                EMP_ID
           100 [email protected]              123
           200 01232222                    123
           300 5555                        123
           100 [email protected]              666
           200 888                         666
           300 999                         666
           300 999                         777
    7 rows selected.I'm supposed to create a SQL that will return me the email, mobile_phone, and home_phone for a set of employees. The result will be something like this:
    EMPLOYEE ID | HOME_PHONE | MOBILE_PHONE | EMAIL
    123         |  5555  |    01232222      | [email protected]
    666         |  999  |    888      | [email protected]
    777         |  444  |    null     | nullThe thing I'm finding difficulty here is that the same column is used to store different values, based on the value in employee_definition table (something like a key/value pair). If I do:
    SQL> select emp_id, def_value as email from employee_data, employee_definition
      2  where employee_data.def_id = employee_definition.def_id
      3  and employee_definition.def_name = 'EMAIL';
        EMP_ID EMAIL
           123 [email protected]
           666 [email protected]'s partially ok.. I'm just getting the definition for 'EMAIL'. But how can I get all the values in a single query, knowing that the column stores different values based on def_name?

    Oh no, not again.
    Entity attribute models always seem like a great idea to people who have been in the profession for five minutes and lack any kind of fundamental knowledge.
    It staggers me that someone with 2,345 posts still believes "you need a 'detail table' for [storing multiple telephone numbers]"
    "A person can have multiple telephone numbers" is not an excuse to build a tired person_attribute table. Niether is the bizarre proposal by someone with over 4k posts who should know better in an earlier post that EAV models are necessary to support temporal fidelity.
    Taken to it's logical conclusion, EAV modelling leads to just two application tables. THINGS and THING_ATTRIBUTES. And when you consider that a THING_ATTRIBUTE is also a THING, why not roll those two tables up into one also? Hmmm, what does THINGS and THING_ATTRIBUTES look like? I know, TABLES and COLUMNS. Who would've guessed? SQL already provides the completely flexible extensible attribute model the advocates of EAV proscribe. But it also has data types, physical data independence, constraints and an efficient query language which EAV does not.
    EAV modelling errodes the semantics of the attributes which are bundled into the "attribute" table.
    There is no point in storing 12 different phone numbers with implied functional dependency to unconstrained and often repeating notional attributes like "MOBILE", "LANDLINE", "WORK", err, "WORK2", err, "MOBILE2", err, ... when this phone type attribute has no semantic value. When you want to call someone, you invariably want to retrive the prefered_phone_number which may depend on a time of day, or a call context.
    These things need to be modelled properly (i.e normalised to BCNF) within the context of the database.

  • How to get all data from inputstream?

    I have written a program to download pages from web sites,
    but sometimes I can't get all the content of the page,
    How can I do?

    //Try the following code:
    //It works in all cases (as long as the client is not //hid beneath a or proxy).
    import java.net.*;
    import java.io.*;
    public class webClient {
         public static void main(String args[]) {
              try{
                   if(args.length < 1) {
                        System.out.println("webClient URL");
                        System.exit(0);
                   URL u = new URL(args[0]);
                   BufferedInputStream inputStream = new BufferedInputStream((u.openConnection()).getInputStream());
                   int n;
                   byte[] buff = new byte[2048];
                   ByteArrayOutputStream out = new ByteArrayOutputStream();
                   while((n = inputStream.read(buff)) >= 0)
                        out.write(buff, 0, n);
                   System.out.println(out.toString());
              } catch(Exception e) {
                   e.printStackTrace();
    }

  • How to get  "all the required records" displayed from my DB

    Hi,
    In a block i have some fields say MONTH, YEAR, STAFF..... and a button SEARCH.
    i want, my app user enter data in one or many fields and after clicking SEARCH button he gets all his relevant data from DB (in next window/canvas).
    i am using 10g.
    help...plz !!!

    ManiKanchan wrote:
    sorry to bother..
    (-----version 10g-----)
    i have 3 blocks B1, B2, B3.... let the name of my table in DB is TB
    in B1, i have a button UPDATE and a trigger, WHEN-BUTTON-PRESSED, attached to it. the pl/sql code here is "go_block('B2'); enter_query;"
    when i come to B2 after pressing UPDATE, i am in query mode as i can say...
    here in B2, i have 3 fields UNIT, MONTH, YEAR and a button SEARCH. I let user enter 1/2/3 field as he/she wishes
    and with search button there is a trigger WHEN-BUTTON-PRESSED with the code "go_block('B3'); execute_query;"
    in B3, fields are STAFF, NAME, WAGES, UNIT, MONTH, YEAR.
    what i want is,
    according to the inputs in B2 ( one or two or all three) , all the relevant records should be displayed on canvas3 ( as B3 fields) as a table
    but i am not getting it right..What is the data type of unit,month and year in block b2 and b3 ?
    If i think these three are number data type
    try this in the search button of block b2
    declare
         con varchar2(500);
         qt varchar2(10):='''';
    begin
         if :B2.UNIT is not null then
              con:='UNIT='||:B2.UNIT;
         end if;
         if :B2.MONTH is not null then
              con:=con||' and MONTH='||:B2.MONTH;
         end if;
         if :B2.YEAR is not null then
              con:=con||' and YEAR ='||:B2.YEAR;
         end if;
    go_block('b3');
    set_block_property('b3',default_where,con);     
    execute_query;
    end;hopes this helps

  • How to get call data entered at IVR from Jtapi?

    Hi all,
    I need help regarding retrieving data entered by caller at IVR to the agent desktop screen.
    Setup is Avaya AES server with Jtapi service and Avaya Voice Portal.
    Application is to be developed using Avaya Jtapi and required to show data entered/keyed in by customer at IVR to agent's screen pop, as soon the call lands to an agent.
    I tried to find out API for that within Avaya Jtapi library, however couldnt find any suitable way to achive the requirement.
    Pls suggest what could be the possible solution for this scenario.
    Thanks,
    Amit

    I would say to find a
    [Avaya Jtapi|http://www.avaya.com/devconnect]
    forum, and not a general Java forum. You are liable to get better and quicker answers.

  • How to get a data element's value from the data file while bursting

    For faxing bursted data into rightafx, I need to first burst my invoice data file into numerous pdf files in the filesystem, and then use the rightfax function of the delivery manager to send those files to different faxes. Integration with rightfax is not available in the bursting engine.
    While bursting the xml data file based on invoice number, I need to get the fax number that is different for each invoice in a java variable so that I can use it to pass fax number information to rightfax. Is it possible?
    Thanks.

    Can any one help?
    Edited by: MTW on Apr 16, 2010 6:58 AM

  • How to get raw data into BI system from maxdb database

    Hi Friends
    I have a scenario where i need to get the raw data from a maxdb database into my BI system.The data is stored in the sapdata folder of maxDB.
    Can you please throw somelight on it?
    Thanks in advance.....................................................

    Hi Rajat
    Please check SAP note 520647.
    It explain the steps for DB Multiconnect using DBCON
    Hope this helps
    Ravinder

  • Hi, Does anyone know how to get all album art to import from Itunes.

    My Itunes Library/Media states that all album art is present and accounted for but when I sync with Itunes half of my album art on the Ipad is blank.

    Hi WIll_Maveric
    To get album art to an album on iTunes:
    Go to iTunes
    Right Click on the album you want to get the art for
    Click album artwork
    If the songs/album can be found on the iTunes database it will add automatically
    If the songs/album cannot be found on the iTunes database it will not add automatically, so I would suggest you go to the internet find the image.
    Copy it and then go into iTunes
    Right click on the album/song
    Click on Get Info
    Click on Artwork
    Paste the image into the box (Command v) or (Control v)P
    Then click OK
    Go to your device and sync it again
    You will have the artwork there.
    Many Thanks for your question and allowing me to help you today.
    iBenjamin Crowley

  • How to get all available VM OS details from my Hyper-v-host?

    HI,
    I have one VM Server in my windows 8 machine, in that I have 2 vm'. Now I want to find alll vm's os detials?
    Thanks in advance.
    A Pathfinder.
    If a post answers your question, please click &quot;Mark As Answer&quot; on that post and &quot;Mark as Helpful&quot;
    Best Online Journal

    or 
    get-vm LapVM1 | select *
    Read more at:
    Hyper-V Cmdlets
    Mike Crowley | MVP
    My Blog --
    Planet Technologies

Maybe you are looking for

  • EBS Formats France

    Hi Folks, I have to set-up the EBS interface for CFONB120 and AFB120 (France) and I would kindly ask you for help. Can someone answer/ help with following: - Do both formats have the same external operation coding so that only one transaction type is

  • VF01/VF04 user exit

    Heloo Gurus, I have a scenario where I need to copy some fields from shipment document (VT03N) into EIKP table at the time of Invoice creation. Transaction VF04/VF01 Can you gurus help me with the appropriate user exit to be used? The process in as f

  • First derived wage type and second derived wage type

    Hi all, Can any of u elaborate in detail what is the use of first derived wage type and second derived wage type in v_512w_b. Regards, Prasad

  • Filter Attributes using IP

    Hi all; In new in IP but I have some experience with BPS. My question is this: is it possible to filter a characteristic to the values of one attribute? Regards; Ricardo

  • Help with blocking pop ups

    i recently started using safari, and now when i click on something that usually pops up, it just loads/re directs me to a new page for it, i clicked (turn off) block pop ups to see if that was the problem, but it wasnt, any ideas how to fix it?