IDCS6 MACOSX JS: data merge multiple txt files one after the other

Hello everyone.

I have a situation where I have to data merge multiple text files to a single file indesign real "base". Databases formats are the same, the point of difference is a code in the second field of the database that refers to a postal box (not a zip/postal code, a code of 'distribution center' that has possibilities of 56 or greater). I would prefer data merge a file and then somehow split the PDF via Acrobat, but the length of postal areas resulting is incompatible and something that cannot be done if the document "split" feature in acrobat.

The database starts as one massive file but using a one line code, can be divided into postal areas in separate text files.

My last question: is it possible data merge several files at the same time (for example one after the other) and to give them their names based on the names of the input text file?

OLE Kvern had a script to merge the data to a file without the user interface. I changed the last line slightly so that it generates a PDF file based on [high quality]:

if(app.documents.length != 0){
        var myDocument = app.activeDocument;
        app.dataMergeOptions.removeBlankLines = true;
        //Select a source file.
        var myDataFile = File.openDialog("Select a data file")
        var exported = "file location(redacted for the sake of this post)"
        if(myDataFile != ""){
                myDocument.dataMergeProperties.selectDataSource(myDataFile,);
                myDocument.dataMergeProperties.exportFile(exported,"[High Quality Print]",);
        }

}

I guess that the answer has to do with the variable "myDataFile" and rather than just being open a dialog box, it could be somehow by selecting a table of text files, but it is where I am out of my depth.

Ideas or thoughts which may not involve trying to do both the many mergers, but can somehow revolve around a great fusion of PDF?

Thank you very much

Colin

Since writing my last response, I realized there was a better answer. It is a scenario of Peter Kahrel and a modified version of a script by Olav Kvern. Details can be found here: batch of merge data | Adobe Community

I have since made other mods to the script is easier to understand:

if(app.documents.length != 0){
// make sure to use the document that is open
        var myDoc = app.activeDocument;
// get the name of the document that is open for future naming purposes
        var myName = myDoc.name
// get the location of the folder that contains both the indesign files and the text files
        var myLocation = "FULL PATH LOCATION OF FOLDER CONTAINING TEXT FILE AND DESTINATION FOR FINAL PDFS"
// define the names of the data files to use based upon the names of the indesign files
        var myImport = myLocation + myName + ".txt"
// define the names of the data merged PDFs to be created
        var myExport = myLocation + myName + ".pdf"
// the actual engine for the merge, including DM instructions such as remove blank lines, object fitting etc.
        var myDataFile = myImport
        app.dataMergeOptions.removeBlankLines = true;
        if(myDataFile != ""){
                myDoc.dataMergeProperties.selectDataSource(myDataFile,);
                myDoc.dataMergeProperties.exportFile(myExport, "[PDF/X-1a:2001]", );
        }

}

If this script will automatically merge a file which is open as LONG as the data file is the same name as the indesign file with .txt at the end for example

Woodward.indd (indesign file)

Woodward.indd.txt (used for merging text file)

This script does still not the original memory and who was using an indesign document, to browse for many text files and merging of PDF based on text files.

HOWEVER, I am sure that the answer to that is based only on the use of the script above (no need to Peter batch convert script) and changing the line 9 to be a loop for... but again, this is where I come to a grinding halt. Any help would be appreciated.

Colin

Tags: InDesign

Similar Questions

  • How to play audio files, one after the other?

    Hi, I try to create an application that tries to read audio files a few one after the other. I've created a loop for playing audio files. But only the first track is played and the second song is playing only about 5 seconds while the rest do not get played at all and the two files that have played, pieces overlap, which is not supposed to be. Can you guys help me? I need urgent assistance that I need to finish it tonight.

    Here are my codes I created for the application:

    package mypackage;
    
    import javax.microedition.media.Manager;
    import javax.microedition.media.MediaException;
    import javax.microedition.media.Player;
    import java.lang.Class;
    import javax.microedition.rms.RecordStore;
    import java.io.InputStream;
    import java.io.ByteArrayInputStream;
    import net.rim.device.api.media.protocol.ByteArrayInputStreamDataSource;
    import net.rim.device.api.system.*;
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.extension.container.*;
    import net.rim.device.api.ui.UiApplication;
    import java.io.IOException;
    
    public class PlayMedia extends UiApplication{
        /**
         * Entry point for application
         * @param args Command line arguments (not used)
         */
        public static void main(String[] args){
    
            PlayMedia theApp = new PlayMedia();
            theApp.enterEventDispatcher();
        }
    
        public PlayMedia()
        {
    
            pushScreen(new PlayMediaScreen());
    
        }
        /**
         * A class extending the MainScreen class, which provides default standard
         * behavior for BlackBerry GUI applications.
         */
        final class PlayMediaScreen extends MainScreen
        {
            /**
             * Creates a new PlayMediaScreen object
             */
            public Player p = null;
            PlayMediaScreen()
            {
                String test3 = "Test(2seconds).mp3";
                String test5 = "Test(2seconds)2.mp3";
                //String test6 = "Test(2seconds)3.mp3";
                String test4 = "Test(2seconds)4.mp3";
                String test1 = "blind_willie.mp3";
                String test2 = "blind_willie.mp3";
                String mp3 = null;
    
                for(int i=0;i<5;i++){
                    if(i == 0){
                        mp3 = test1;
                    }
                    else if(i == 1){
                        mp3 = test2;
                    }
                    else if(i == 2){
                        mp3 = test3;
                    }
                    else if(i == 3){
                        mp3 = test4;
                    }
                    else if(i == 4){
                        mp3 = test5;
                    }
                    //testing
                    System.out.println("Song is "+ mp3 + "???????????????????????????????????????");
    
                    play(mp3);
    
                    System.out.println("Song is "+ mp3 + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                }
            }
    
            private void play(String mp3){
    
            InputStream stream = (InputStream)this.getClass().getResourceAsStream("/" + mp3);
    
                try {
                    //p = Manager.createPlayer(source);
                    p = Manager.createPlayer(stream, "audio/mpeg");
                    p.realize();
                    p.prefetch();
    
                    //testing
                    System.out.println("Creating Players!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                    System.out.println("The mp3 is " + mp3 + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
    
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
    
                    //testing
                    System.out.println("IO Exeception!!!!!!!!!!!!!!!!1 " + e);
    
                    //testing
                    System.out.println(p);
    
                } catch (MediaException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
    
                //testing
                System.out.println("Media Exeception!!!!!!!!!!!!!!!!1" + e);
    
                //testing
                System.out.println(p);
                }
                /*
                 * Best practice is to invoke realize(), then prefetch(), then start().
                 * Following this sequence reduces delays in starting media playback.
                 *
                 * Invoking start() as shown below will cause start() to invoke  prefetch(0),
                 * which invokes realize() before media playback is started.
                 */
                try {
                    p.start();
                } catch (MediaException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
    
                    //testing
                    System.out.println("Media Exeception for starting!!!!!!!!!!!!!!!!1" + e);
    
                    //testing
                    System.out.println(p);
                }
                /*
                try {
                    p.stop();
                } catch (MediaException e) {
                // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                p.deallocate();
                p.close();
                */
    
            }
        }
    }
    

    Please help me! Thanks in advance!

    What you will do, is add the PlayerListener and / if you have in your loop code would go in the treatment of the END_OF_MEDIA event. Once that noise has stopped you will start the next sound and add the listener of player.

    //Declarations
    PlayerListener pListen;
    String mp3 = "";
    
    ..........
    ..........
    
    pListen = new PlayerListener(){
       public void playerUpdate(Player player, String event, Object eventData) {
          if (event.equals(PlayerListener.END_OF_MEDIA)) {
             if( mp3.equals(test1) ) mp3 = test;
             else if( mp3.equals(test2) ) mp3 = test3;
             else if( mp3.equals(test3) ) mp3 = test4;
             .........
    
             InputStream stream = (InputStream)this.getClass().getResourceAsStream("/" + mp3);
             p = Manager.createPlayer(stream, "audio/mpeg");
             p.realize();
             p.prefetch();
             p.addPlayerListener(pListen);
             p.start();
          }
       }
    }
    
    InputStream stream = (InputStream)this.getClass().getResourceAsStream("/" + mp3);
    p = Manager.createPlayer(stream, "audio/mpeg");
    p.realize();
    p.prefetch();
    p.addPlayerListener(pListen);
    p.start();
    

    So, add the try-catch blocks.

  • Merge two favorite files - one of the former without losing new entries

    I'm trying to move the Favorites from one computer to another, without losing the favorites that have been added to the second computer, which can ONLY be the first. Once I have export favorites from the first computer on a port USB, import replace simply all the Favorites on the second computer folder or it will ask me if I want to record a new one to the old double the second favorite of the computer file (like when you save jpg files).

    Or is there another way to "merge" two folders, as visually opening upward both files and selecting what to switch to the hand...

    Thanx

    PS - am moving to Vista on a Windows 7 computer. as well as the synchronization of the two win 7 after that.

    Hi Maril,

    Thanks for posting your question in the Microsoft Community Forums.

    Based on the information, you find out when you try to move the Favorites from one computer to another, if the existing Favorites in the second computer will be deleted.

    Usually, when you import bookmarks to another computer, it will not replace the already existing bookmarks on the second computer.

    However, to be on the safer side, you can take a backup of the bookmarks on the second computer to another folder or another location.  Try favorites of the importation of the first computer to the second computer, check if you are able to access to existing favorites as well as any.

    If this is not the case, try adding the Favorites of the backup location to imported Favorites and check if it helps.

    You can also copy favorites from the second computer to the first computer and save it in a new folder. Try to create another folder containing the computer the two first and second Favorites and then import the Favorites from this folder to the second computer.

    For more information, see the article:

    Add, view, and organize Favorites

    Hope the helps of information.

    Let us know if you need help with Windows related issues. We will be happy to help you.

  • Apps get beachballed one after the other on the new iMac. Help with my log files?

    Hey guys, thanks for reading this.

    Every day, a beachball appears when you something for on El Capitan. Could not get it to a specific action. One day he could write an email the other day, while in iCal, Photoshop, after a spotlight search. I need hard close the iMac with the button on the back.

    In this case: a beachball is displayed once I did something. When an application is "beachballed", the application no longer leads, I can switch to other applications, just to beachball them as well. It's like a contagious disease. In some applications before the beachball is "taken by the infection", I can do things, just to be beachballed shortly after.

    One thing that never works opens the top menu left apple to close the iMac. It won't just open but shows the beachball.

    Nice surprise here, new iMac, 32 gig RAM, last update of El Capitan.

    After a few crashes, I went in spotlight preferences and checked all items to spotlight indexes no more nothing. I thought that it might help, but apparently it didn't. It's newspapers since the last crash:

    29.06.16 14:46:17, 635 safari [684]: making closing tcp_connection_destination_handle_tls_close_notify 561 due to the TLS CLOSE_NOTIFY alert

    29.06.16 14:46:17, 635 safari [684]: tcp_connection_tls_session_error_callback 561 __tcp_connection_tls_session_callback_write_block_invoke.434 error 32

    29.06.16 14:46:17, 722 safari [684]: making closing tcp_connection_destination_handle_tls_close_notify 566 due to the TLS CLOSE_NOTIFY alert

    29.06.16 14:46:17, 722 safari [684]: making closing tcp_connection_destination_handle_tls_close_notify 565 due to the TLS CLOSE_NOTIFY alert

    29.06.16 14:46:17, 722 safari [684]: tcp_connection_tls_session_error_callback 566 __tcp_connection_tls_session_callback_write_block_invoke.434 error 32

    29.06.16 14:46:17, 722 safari [684]: tcp_connection_tls_session_error_callback 565 __tcp_connection_tls_session_callback_write_block_invoke.434 error 32

    29.06.16 14:46:17, 723 [684] safari: making closing tcp_connection_destination_handle_tls_close_notify 562 due to the TLS CLOSE_NOTIFY alert

    29.06.16 14:46:17, 723 [684] safari: tcp_connection_tls_session_error_callback 562 __tcp_connection_tls_session_callback_write_block_invoke.434 error 32

    29.06.16 14:46:17, 728 safari [684]: tcp_connection_destination_handle_tls_close_notify 563 closing taken due to the TLS CLOSE_NOTIFY alert

    29.06.16 14:46:17, 729 safari [684]: tcp_connection_tls_session_error_callback 563 __tcp_connection_tls_session_callback_write_block_invoke.434 error 32

    29.06.16 14:46:17, 731 safari [684]: making closing tcp_connection_destination_handle_tls_close_notify 564 due to the TLS CLOSE_NOTIFY alert

    29.06.16 14:46:17, 731 safari [684]: tcp_connection_tls_session_error_callback 564 __tcp_connection_tls_session_callback_write_block_invoke.434 error 32

    29.06.16 14:46:01, 890 via [86]: NETWORK: refresh, 0, 0, 0, 0, 23, articles, fQueryRetries, 0, fLastRetryTimestamp, 488897002.3

    29.06.16 14:46:54, 792 via [86]: NETWORK: no response from server, accessibility, 2, queryRetries, 0

    29.06.16 14:47:07, 134 WindowServer [207]: send_datagram_available_ping: pid 830 has not acted on a ping it removed before expiring.

    29.06.16 14:47:07, 134 WindowServer [207]: send_datagram_available_ping: pid 356 has not acted on a ping it removed before expiring.

    29.06.16 14:47:07, 134 WindowServer [207]: send_datagram_available_ping: pid 229 did not act on a ping it removed before expiring.

    29.06.16 14:47:07, 170 useractivityd [324]: (null) application considered for the continuation of the activity, but rejected because it will run by using a suitable architecture

    29.06.16 14:47:11, 375 useractivityd [324]: (null) application considered for the continuation of the activity, but rejected because it will run by using a suitable architecture

    29.06.16 14:47:11, 653 via [86]: NETWORK: refresh, 0, 0, 0, 0, 23, articles, fQueryRetries, 1, fLastRetryTimestamp, 488897194.9

    29.06.16 14:47:13, useractivityd 256 [324]: (null) application considered for the continuation of the activity, but rejected because it will run by using a suitable architecture

    29.06.16 14:47:23, com.apple.xpc.launchd [1 727]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert endpoint ' _OpenStep da (Apple) "owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 727]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "of _OpenStep" (Apple) owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 727]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "_OpenStep en (Apple)" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 727]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "en_AU (Apple) _OpenStep" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 727]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "en_CA (Apple) _OpenStep" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 727]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "en_CN _OpenStep (Apple)" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 727]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "en_GB (Apple) _OpenStep" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 727]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "en_IN _OpenStep (Apple)" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 727]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "en_JP _OpenStep (Apple)" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 727]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "en_SG _OpenStep (Apple)" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 727]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "fr_FR (Apple) _OpenStep" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 727]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "_OpenStep es (Apple)" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "fi (Apple) _OpenStep" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "_OpenStep en (Apple)" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "TI (Apple) _OpenStep" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "_OpenStep ko (Apple)" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "nb (Apple) _OpenStep" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "_OpenStep nl (Apple)" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "_OpenStep pl (Apple)" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "pt (Apple) _OpenStep" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "pt_BR (Apple) _OpenStep" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "pt_PT (Apple) _OpenStep" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert "_OpenStep ru (Apple)" termination point of the owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "sv (Apple) _OpenStep" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "_OpenStep tr (Apple)" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:23, com.apple.xpc.launchd [1 728]: (com.apple.xpc.launchd.domain.user.501) Service "com.apple.xpc.launchd.oneshot.0x10000014.AppleSpell" attempted to divert the end point "_OpenStep multilingual (Apple)" owner: com.apple.xpc.launchd.oneshot.0x10000005.AppleSpell

    29.06.16 14:47:36, 115 via [86]: NETWORK: no response from server, accessibility, 2, queryRetries, 1

    29.06.16 14:47:37, 141 SystemUIServer [391]: Spotlight: Service connection down!

    You experts, what I can do to narrow down the problem?

    Sentence, I want to set up the entire system from scratch because I'm working on this thing.

    Thank you

    This kind of behavior is sometimes caused by a fault memory. If you have replaced or adding memory, please test with only the original memory installed and see if the stop gel.

  • Inserting data in a txt file

    Hello world
    I created a form in 6i where I can open a .txt file to show me all the data in this file, so after the display of data in my form, I press a button and I insert data in my database, but if I add new data to this .txt file when I press record it says that certain values are already inserted and they cannot be repeated , because the id is not null, so what I want to ask you is how can I modify the same program to make me insert values that are not already inserted. Only new data.
    This is my code:
    Get_file_contents PROCEDURE IS
    Salida Varchar2 (1000);
    Compañía Varchar2 (5);
    Number of alert: = 0;
    OUT_FILE Text_IO. Type_de_fichier;
    -in_file Text_IO. Type_de_fichier;
    -linebuf Varchar2 (1000);

    Function Abre_Archivo
    Return boolean is

    BEGIN
    OUT_FILE: = Text_IO. Fopen(:file_name,'r');
    Return (true);
    exception
    While others then
    Return (false);
    END;

    BEGIN
    go_block ('MY_BLOCK');
    clear_block (no_validate);
    premier_enregistrement;
    If Abre_Archivo then
    OUT_FILE: = Text_IO. Fopen(:file_name,'r');
    End if;
    -Validation;

    LOOP
    Text_IO. Get_Line (OUT_FILE, Salida);
    : MY_BLOCK. SCHOOL_ID: = substr (Salida, 1, instr(Salida,',',1,1)-1);
    : MY_BLOCK. CLASS_ID: is substr (Salida, instr(Salida,',',1,1) + 1, (instr(Salida,',',1,2)-instr(Salida,',',1,1))-1);.
    : MY_BLOCK. Class_name: = substr (Salida, instr(Salida,',',1,2) + 1);
    : MY_BLOCK. STATUS: = 'A ';

    next_record;
    Synchronize;
    END LOOP;

    Text_IO. Fclose (OUT_FILE);
    premier_enregistrement;
    Exception when No_Data_Found then
    delete_record;
    Text_IO. Fclose (OUT_FILE);
    premier_enregistrement;
    END;

    OK, the constraint is the id of class only. So adjust the WHERE condition so that it only checks the class id.

  • How to ignore the details of footer when loading data from a .txt file

    Hello experts,

    I import data from a txt file in my database. I jumped my header using SKIP information, but how can I ignore my footer details.
    Thank you

    Answer on your other thread:

    Txt for a required format file processing

  • I can't have multiple files open at the same time! I need to compare the content from one to the other. How to display two files at the same time?

    I can't have multiple files open at the same time! I need to compare the content from one to the other. How to display two files at the same time?

    Hi sindres79946597,

    Open Acrobat Reader DC, navigate to the Edit-> Preferences-> General-> uncheck "Open Documents in the new tab in the same window.

    Now, reboot your system, when you open multiple PDFs that all will open in a new window so that you can easily compare.

    Kind regards
    Nicos

  • Hi all, I want to know what can I complie forms in windows and run the file met in the other operating system

    Hi all, I want to know what can I complie forms in windows and run the file met in the other operating system

    3177349 wrote:

    Hi all, I want to know what can I complie forms in windows and run the file met in the other operating system

    It depends only on the BONE of the application server.

    If your OS development and OS is different, you have to compile the fmb in the server again.

    Hamid

  • My files disappear after the trial 30 of Acrobat Pro?

    My files disappear after the trial 30 of Acrobat Pro?

    Thank you

    Ed

    N ° you just can't use Acrobat on your computer more (unless you buy it,

    of course).

  • Data merge multiple records do not work

    Hi all

    When you try to merge multiple records, the result is the same if I selected just a recording.

    Here's the situation:

    Source file:

    • Excel file with several records, saved as a csv and txt

    The target file:

    • InDesign CS4 file with a single page.
    • framework of a text on the page,
    • a table with the header line and a line of body
    • every cell of body line contains a data field

    I went through all the necessary steps:

    • Choose the data source file (tried with csv and txt, the results are the same) and insert the fields in the table
    • chose "All records" to merge
    • to merge records: selected multiple records

    After choosing "Preview", I see only one record per page, and the new pages are created automatically for EACH record! This is not what I want.

    What I want is for as many records if poster in the table as possible and then to InDesign to create additional if necessary pages.

    What I am doing wrong, or isn't it possible?

    Thank you for all your comments!

    Several records, ID to duplicate everything on the page, so unless there is enough space for all of this, you will get several records.

    Think of it as a frame around all your items, group, then using the step and repeat, except merge data won't allow any element to extend beyond the edge of the drawing page.

  • Average data from multiple text files

    I am new to labVIEW so any help is appreciated:

    I have a 100 txt files with two columns (separate tab) for a value of X and Y.

    I need the average of the values of Y to generate a single file and generate X against Y graph.

    So, how to read the data of these text files? (without having to select each one individually) and the average data and create a chart XY him?

    Thanks in advance

    There is a function to list folder in the palette of the file i/o that will return an array of file names.  Feed this table in a loop to open and read each file in turn.  Put in a new file, build a table with her, process the data or do whatever you want.

  • How constantly write data in a txt file

    Hello
    first of all, sorry for the bad English, but I have a problem to write data continuously to the txt file... I have a chart 2D with values based 2 sliders (sliders values) and some functions I want to interpolate the value by using the bilinear method... and after that the value of the sliders, interpolated value and the value of the closest points, I want to write to a file txt... for every 2-3 seconds perhaps, it would be ideal to be formatted as ::
    x y f f1 f2 f3 f4
    ..   ..  .. . .. .   ..   ...  . ..
    ... ...  ..    ...   ...   ...   ...

    but... first of all I have a problem with writing data, because every time he deletes old data and simply write a new and it is not horizontal... I am very very new to this (it's obvious) and any help will be very grateful 
    Thank you

    Diane beat me to it, I made a few changes to your code, so I'll post it anyway.

    As proposed, please go through the tutorials.

    I added an entry to the worksheet at the end node just to show it can be done at the end so. Table of building on a while loop is not very efficient memory, but it's just to show you what can be done. If you plan to go this route, initialize an array and use the subset to the table replace.

    All the best.

  • write data to a txt file

    Hello.

    I use visa and serial Protocol in my vi n want to save the data from MCU in labview to txt file format which, in the data record in each row not each tab.

    I want to just save not given time. Meanwhile, I plot the data in the chart.

    I search in the forum and consider the posts but can't find a solution.


  • Reading data from txt file and move the engine for the data

    At this point, I had the table and I already read txt file and I want to read the data in table and separate the corresponding element in 3 parts (3 axes: X, Y, Z) and I was able to make the transmission of data to move the motor in this position. and the treatment will be repeated after completing the first point

    Hey, the Index Array function may be what you are looking for. Here is the link to the documentation for this function.

    Function table index

    https://zone.NI.com/reference/en-XX/help/371361L-01/Glang/index_array/

  • How to save data in a txt file.

    Does anyone know why the txt file is empty with no content?

    FILE * f = fopen ("/ shared/documents/save.dat", "w");
    {if(f==null)}
    fprintf (stderr, "Failed to create output. txt\n");
    _exit(2) (1);
    }
    fprintf (f, "Hello World");

    File is created, but the file txt empt without 'Hello World '.

    Ha ha solved.

    fclose (f);

Maybe you are looking for