Redirecting XSLT output to multiple files

Hi,
I am trying to redirect the output of the XSLT into multiple files using
<xsl:variable name="filename" select="concat(@id,'.xml')" />
<redirect:write select="$filename">
</redirect:write>I dont want to hard-code the directory of the $filename in XSL, I want to set it or resolve it programatically in the java code.
Can you please tell me if this can be done in someway ?

Aravinda wrote:
I dont want to hard-code the directory of the $filename in XSL, I want to set it or resolve it programatically in the java code.
Can you please tell me if this can be done in someway ?You + setParameter + method of your Transformer in java code to set parameters. like below:
transformer.setParameter("message1", "This is my message to XSLT from Java Class.");
transformer.setParameter("message2", "Hello XSLT how are you?");
. . .You can retrieve above parameters in global parameters/variables(must be as child of xsl:stylesheet element in xslt) defined in xslt like below:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:param name="message1"></xsl:param>
     <xsl:variable name="message2"></xsl:variable>
     <xsl:template match="/">
          <xsl:value-of select="$message1"/>     // retrieving message1
          <xsl:value-of select="$message2"/>     // retrieving message2
          <xsl:value-of select="concat($message1,$message2)"/>     // performing concat on message1 and message2
     </xsl:template>
</xsl:stylesheet>*Cheers
TYPUROHIT*
(Tejas Purohit)

Similar Messages

  • Split XSLT Output into Multiple Files

    I have an XML-to-File scenario working, but now I need to split my XSLT map output into multiple files based on the data.  I have been reading the Jin Shin blog on message splitting, but don't know that it pertains to my situation.
    XML data getting mapped with XSLT map creates output formatted like this.
    <?xml version="1.0" encoding="utf-8"?>
    <ns1:ColdInvoiceData xmlns:ns1="http://graybar.com/cold/invoice">
    <Header>
      <RecordID>HDR</RecordID>
      <InvoiceNumber>15</InvoiceNumber>
    </Header>
    <Details>
      <RecordID>DTL</RecordID>
      <LineItemNumber>001</LineItemNumber>
      <UnitPrice>1.25</UnitPrice>
    </Details>
    <Details>
      <RecordID>DTL</RecordID>
      <LineItemNumber>002</LineItemNumber>
      <UnitPrice>2.22</UnitPrice>
    </Details>
    <Header>
      <RecordID>HDR</RecordID>
      <InvoiceNumber>16</InvoiceNumber>
    </Header>
    <Details>
      <RecordID>DTL</RecordID>
      <LineItemNumber>001</LineItemNumber>
      <UnitPrice>3.33</UnitPrice>
    </Details>
    </ns1:ColdInvoiceData>
    I currently have this output writing to a file (FTP, File Conversion).  A single file is no issue, but I need to send multiple files for every set of HDR/DTL(s).  I also need to put the invoice number in the filename (which is working fine as a parameter in my single FTP File CC now).
    Can I make this happen with message splitting and maybe a second map (GUI map)?  Do I need to adjust the XSLT output XML format to have an invoice level?  Is there a better way to go?
    Thanks!

    I made a change to the namespace used on the Messages/Message1 nodes (since the system-assigned ns0 was already being used in my xml data) and now I am getting output. 
    The problem is that the output matches my input.  As aforementioned, I started with just a one-to-one mapping on every node and field. 
    When I change the mapping to try to force multiple ColdInvoiceData nodes, I get the following error (when my source has two Invoice nodes):
    <Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:Messages/ns0:Message1/ns1:ColdInvoiceData[2]/Invoice. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at
    When my source has one invoice node, it works ok.
    Here is a screenshot of my mapping structure.
    http://webpages.charter.net/kpwendel2/ib.jpg

  • Redirect SM50 output on unix file

    Hello,
    how can we execute daily SM50 daily and redirect html output on unix file?
    I Tried SE38, execute SM50 succefully, but no way to redirect output of this transaction on a unix file ?
    Thanks in advance.

    Hi majda,
    Hope you are doing good.
    Maybe check /nSM49 and create a OS command using ">>" operator Divyanshu mentioned:
    Restrict Authorizations for Executing External Commands - SAP NetWeaver Application Server ABAP Security Guide - SAP Lib…
    Thank you!
    Kind Regards,
    Hemanth
    SAP AGS

  • How to redirect CELLCLI output to text file

    Hi,
    I would like to redicrect the output of the cellcli command to a text file .
    For example , how to redirect the output of this command to a text file on /tmp
    CellCLI> list metrichistory where objectType = 'CELL' -
    and name = 'CL_TEMP'Thanks

    cellcli has spooling capabilities similar to sqlplus:
    CellCLI> help spool
      Usage:  SPO[OL] [<filename> [ CRE[ATE] | REP[LACE] | APP[END]] | OFF ]
      Purpose: SPOOL <filename>: Direct the results to the file <filename>.
               SPOOL OFF: Turn off the spooling.
               SPOOL: Check the current spooling status.
      Arguments:
        <filename>: The filename where the results will be output.
      Options:
        [APPEND]: If the filename already exists, the following output will
                  be appended to the file. Without this option, the existing file
                  contents will be replaced.
        [CREATE]: If the filename already exists, an error is reported.
        [REPLACE]: If the filename already exists, the contents will be
                  replaced.  This is the default, when no option is provided.
      Examples:
        spool myfile
        spool myfile append
        spool off
        spoolBut if you are trying to script it, it would be easier to just run it command line:
    # cellcli -e "list metrichistory where objectType = 'CELL' and name = 'CL_TEMP'" > /tmp/CL_TEMP.txtAlso look into dcli which allows you to run cellcli commands on one or more cells from a compute node.
    Good luck.

  • Split SQR output into multiple files And Rename each file.

    Greetings!
    We ran into scenario where we need to split an SQR output (PDF) split into multiple files (each page , each file). More over the out put has to be renamed with EMPLID.
    It is for printing Advices, where we run DDP003 to print all of them, Our requirement needs to have one PDF file for each employee to placed into a shared drive OR to be emailed.
    I was thinking of running the same process in a loop individually, but this is resource intensive. Is there any way we can batch run this SQR process and split into each page (each paychek comes to one page),
    AND
    I need them renamed by SQR as it creates them, Each file would be names as EMPLID.
    This is all in alternative to run process individually by employee , via self service. to not to over laod Process scheduler server.
    Can anyone help me how can we get these thigns done in SQR?
    Thanks in advance.

    You can use the SQR command new-report for each employee which closes the current report output file and opens a new one with the specified file name (e.g. EMPLID).

  • Redirecting spool output to a file on app. server

    I'm running a SAP report as a background job.
    I hve a requirement to send the spool output to a file on app. server. This needs to happen automatically in background.
    I'll appreciate any suggestion.

    Hi,
    use report from Re: output to pdf format and substitute pc-download with file transfer
    good luck
    Andreas

  • Junk Characters in Report Output(While redirecting the output to text file)

    While generating the report (Reports 9i) output to a text file, I get the report output that contains junk characters. The other output formats viz. pdf, rtf have no problem.
    Please share how to correct it.
    Thanks.

    Yes, the MODE is set to Character and DESFORMAT is set to DFLT.
    Still the problem exists.
    Any idea please?

  • XMP output for multiple files

    Is it possible to generate separate xmp files containing metadata from several images without having to open each one manually?  I'd think it could be done using something like a Ps action run via Bridge, but doesn't look like that's possible.
    Thanks,
    Zolt

    Yes it's possible..
    Run the following code from ExtendScript Toolkit. Make sure you select the files in Bridge first.
    The xmp files will be created on the desktop.
    #target bridge
    var sels = app.document.selections;
    for(var a in sels){
    sourceFile = new Thumbnail(sels[a]);
    var Name = decodeURI(sourceFile.name).replace(/\.[^\.]+$/, '');
    var md = sourceFile.synchronousMetadata;
    var outFile = new File("~/desktop/"+Name+".xmp");
    outFile.open('w');
    outFile.encoding = 'UTF8';
    outFile.writeln(md.serialize());
    outFile.close();

  • Redirect the output of SQL*Plus to the file

    Hi all,
    I have the following command to run:
    sqlplus username/password @myfile.sql
    I don't know how to redirect the output to the file.
    Also in the script myfile.sql I have the defined variable, &VP and
    How can I substitute this variable(&VP) at the run time.
    Thanks,
    JP

    Assumed you like to replace your defined variable VP by number 4. SInce it is posintional parameter,instead of wrinting &VP, write
    VP:=&1
    sqlplus>spool redirect.txt
    sqlplus>@myfile.sql 4
    sqlplus>spool off

  • Redirecting cmd output to a JTextArea

    can anyone help me, im curious how can the compilers for java e.g.: Netbeans, JCreator, redirect the command promt output to a JTextArea..
    can anyone guide me on what class to look at??
    thanks a lot

    here is a simple class that redirects the standard output to a file called a.txt. you have to look into the class java.class.System. and other i/o classes
    import java.io.PrintStream;
    public class A {
        public A() {
        public static void main(String[] args) throws Exception {
            PrintStream fileOut = new PrintStream("a.txt");
            System.setOut(fileOut);
            for (int i = 0; i < 10; i++) {
                System.out.println(i);
    }for your case where output goes to a textArea you might wanna use a multithreaded solution. redirect your output to a file as above and use the thread to read the file and paste text into your text area. there is other better solution that directly passes data into the textArea. i'll post it if can find it in my code base.

  • XML output to a file

    Hi,
    I am using XSU to querry a table and generate XML output.
    When I execute a file (say for example test.sql), is there a way I can save this XML output to a file (say 'something.xml') ??
    Can any one help ?
    Thanks.
    vikram

    Hi,
    Thanks for your reply.
    But I am sorry I didn't get you. I can't use the second option because I am not using XSQL.
    Coming to the first option, I didn't understand where to type
    java OracleXML ... > SomeFile.xml
    Can you explain pls ?
    Once again this is what I have got....
    Say, I have a file test.sql which contains the following code
    select xmlgen.getXML('select * from scott.emp1',1) from dual;
    commit;
    set serveroutput on
    Now, when I execute the file in SQL prompt I get the following output.
    <ROWSET>
    <ROW num="1">
    <EMPNO>7369</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    <MGR>7902</MGR>
    <HIREDATE>1980-12-17 00:00:00.0</HIREDATE>
    <SAL>800</SAL>
    <DEPTNO>20</DEPTNO>
    </ROW>
    <ROW num="2">
    <EMPNO>7499</EMPNO>
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>1981-02-20 00:00:00.0</HIREDATE>
    <SAL>1600</SAL>
    <COMM>300</COMM>
    <DEPTNO>30</DEPTNO>
    </ROW>
    </ROWSET>
    I want this result to go to a file (.xml) instead of displaying the output in the SQL prompt.
    How do I do this ? Pls explain. Thanks.
    vikram
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    Two ways:
    (1) Just redirect the output to a file like:
    java OracleXML ... > SomeFile.xml
    (2) Use the XSQL Command Line utility
    and build an XSQL Page that describes
    the query you want to do. Then you can
    do:
    $ xsql yourfile.xsql SomeFile.xml<HR></BLOCKQUOTE>
    null

  • How to redirect console output while starting server from within IDE

    Hello, i am using Weblogic Workshop IDE. When I start the server, a new cmd shell is launched and the jvm output is displayed in this cmd shell window. How can I redirect this output to show up within the IDE (for instance in the Console view)?
    Problem is that when an error occurs, the cmd window disappears and I cannot tell what the error was.
    Surely there is a way to do this as other IDEs (JBuilder, Rational etc.) allow this.
    Thanks:
    -Sam

    Hi Sam,
    Unfortunately, this feature does not exist in Workshop 9.2
    Regarding your question about redirecting the output, the logs are saved under the domain directory.
    You could also refer to the following section for additional info on redirecting the output to multiple destinations.
    http://e-docs.bea.com/wls/docs90/ConsoleHelp/taskhelp/logging/RedirectJVMOutput.html
    Hope this helps.
    cheers
    Raj

  • Read multiple files and save all into one output file(AGAIN)

    Hi, guys
    I need your help for reading data from multiple files and save the results into one output file. When files are selected from file chooser, my program read the data line by line , do some calculations and save the result into the output. I made an array to store input files and it seems to be working fine, but when it comes to SaveFile() function, issues NullPointException message.
    public class FileReduction1 extends JFrame implements ActionListener
       // GUI definition and layout
        /* ACTION PERFORMED */
        public void actionPerformed(ActionEvent event) {
            if (event.getActionCommand().equals("Open File")) getFileName();
        /* OPEN THE FILE */
        private void getFileName() {
            // Display file dialog so user can select file to open
         JFileChooser fileChooser = new JFileChooser();
         fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            fileChooser.setMultiSelectionEnabled(true);
         int result = fileChooser.showOpenDialog(this);
         // If cancel button selected return
         if (result == JFileChooser.CANCEL_OPTION) return;
            if (result == JFileChooser.APPROVE_OPTION)
             files = fileChooser.getSelectedFiles();
                textArea.setText("");
                if(files.length>0)
                    filelist="";
                    System.out.println("files length"+files.length);
                    for(int i=0;i<files.length;i++)
                         System.out.println(files.getName());
    filelist+=files[i].getName()+" ,";
    if (checkFileName(files[i]) )
    openButton.setEnabled(true);
    readButton.setEnabled(true);
    textArea.append("file "+files[i].getName()+"is a proper file"+"\n");
    readFile(files[i]);
    textfield.setText(filelist);
    else{JOptionPane.showMessageDialog(this,"Please select file(s)",
                    "Error 5: ",JOptionPane.ERROR_MESSAGE); }
         // Obtain selected file
    /* READ FILE */
    private void readFile(File fileName_in) {
    // Disable read button
    readButton.setEnabled(false);
    // Dimension data structure
         getNumberOfLines(fileName_in);
         data = new String[numLines][4];
         // Read file
         readTheFile(fileName_in);
         // Rnable open button
         openButton.setEnabled(true);
    /* GET NUMBER OF LINES */
    /* Get number of lines in file and prepare data structure. */
    private void getNumberOfLines(File fileName_in) {
    int counter = 0;
         // Open the file
         openFile(fileName_in);
         // Loop through file incrementing counter
         try {
         String line = fileInput.readLine();
         while (line != null) {
         counter++;
              System.out.println("(" + counter + ") " + line);
    line = fileInput.readLine();
         numLines = counter;
    closeFile(fileName_in);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile(fileName_in);
         System.exit(1);
    /* READ FILE */
    private void readTheFile(File fileName_in)
    // Open the file
    //int row=0;
    int col=0;
    openFile(fileName_in);
    System.out.println("Read the file");
    // Loop through file incrementing counter
    try
    String line = fileInput.readLine();
    while (line != null)
    boolean containsDoubles = false;
    double temp;
    String[] lineParts = line.split("\t");
    try
    for (col=0;col<lineParts.length;col++)
    temp=Double.parseDouble(lineParts[col]);
    data[row][col] = lineParts[col];
    containsDoubles = true;
    System.out.print("data["+row+"]["+col+"]="+lineParts[col]+" ");
    } catch (Exception e) {row=0; col=0; temp=0.0;}
    if (containsDoubles){ row++;}
    System.out.println();
    line = fileInput.readLine();
    catch(IOException ioException)
    JOptionPane.showMessageDialog(this,"Error reading File", "Error 5: ",JOptionPane.ERROR_MESSAGE);
    closeFile(fileName_in);
    System.exit(1);
    //System.out.println("length"+data.length);
    closeFile(fileName_in);
    process(fileName_in);
    /* CHECK FILE NAME */
    /* Return flase if selected file is a directory, access is denied or is
    not a file name. */
    private boolean checkFileName(File fileName_in) {
         if (fileName_in.exists()) {
         if (fileName_in.canRead()) {
              if (fileName_in.isFile()) return(true);
              else JOptionPane.showMessageDialog(null,
                        "ERROR 3: File is a directory");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 2: Access denied");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 1: No such file!");
         // Return
         return(false);
    /* OPEN FILE */
    private void openFile(File fileName_in) {
         try {
         // Open file
         FileReader file = new FileReader(fileName_in);
         fileInput = new BufferedReader(file);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
         textArea.append("OPEN FILE\n---------\n");
         textArea.append(fileName_in.getPath());
         textArea.append("\n");
         //System.out.println("File opened successfully");
    /* CLOSE FILE */
    private void closeFile(File fileName_in) {
    if (fileInput != null) {
         try {
              fileInput.close();
         catch (IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File closed");
    private void process(File fileName_in) {
    //getNumberOfLines();
         //data = new String[numLines][3];
         // Read file
    double temp,temp1;
         //readTheFile();
    //System.out.println("row:"+row);
    //int number=data.length;
    //System.out.println(number);
    for (int i=0; i<row; i++)
    temp=Double.parseDouble(data[i][1]);
    sumx+=temp;
    temp1=Double.parseDouble(data[i][3]);
    sumy+=temp1;
    multixy+=(temp*temp1);
    square_x_sum+=(temp*temp);
    square_y_sum+=(temp1*temp1);
    //System.out.println("Sum(x)="+sumx);
    double tempup=(row*multixy)-(sumx*sumy);
    double tempdown=(row*square_x_sum)-(sumx*sumx);
    slope=tempup/tempdown;
    double tempbup=sumy-(slope*sumx);
    intb=tempbup/row;
    double tempside=(row*square_y_sum)-(sumy*sumy);
    double cordown=Math.sqrt(tempdown*tempside);
    corr=tempup/cordown;
    r_sqrt=corr*corr;
         textArea.append("Data for file"+ fileName_in.getName()+" have been processed successfully.");
         textArea.append("\n");
         textArea.append("Please enter output file name including extension.");
    System.out.println("number"+row);
    System.out.println("slope(m)="+slope);
    System.out.println("intecept b="+intb);
    System.out.println("correlation="+corr);
    System.out.println("correlation="+r_sqrt);
    saveFile();
    private void saveFile()
    textArea.append("SAVE FILE\n---------\n");
    if (openFile1())
         try {
              outputToFile();
    catch (IOException ioException) {
              JOptionPane.showMessageDialog(this,"Error Writing to File",
                   "Error",JOptionPane.ERROR_MESSAGE);
    private boolean openFile1 ()
         // search for the file path
    StringBuffer stringpath;
    title=textfield1.getText().trim();
    int temp=fileName_in.getName().length();
    int temp_path=fileName_in.getPath().length();
    int startd=(temp_path-temp);
    stringpath=new StringBuffer(fileName_in.getPath());
    stringpath.delete(startd, temp_path+1);
    //System.out.println("file-path="+temp_path);
    //System.out.println("length-file="+temp);
    path=stringpath.toString();
    fileName_out = new File(path, title);
    //System.out.println(file_out.getName());
    if (fileName_out==null || fileName_out.getName().equals(""))
         JOptionPane.showMessageDialog(this,"Invalid File name",
                   "Invalid File name",JOptionPane.ERROR_MESSAGE);
         return(false);
         else
    try
    boolean created = fileName_out.createNewFile();
    if(created)
    fileOutput = new PrintWriter(new FileWriter(fileName_out));
    fileOutput.println("File Name"+"\t"+"Slope(m)"+"\t"+"y-intercept(b)"+"\t"+"Coefficient(r)"+"\t"+"Correlation(R-Squared)");
    return(true);
    else
    fileOutput = new PrintWriter(new FileWriter(fileName_out,true));
    return(true);
    catch (IOException exc)
    JOptionPane.showMessageDialog(this,"Please enter the file name","Error",JOptionPane.ERROR_MESSAGE);
    return(false);
    private void outputToFile() throws IOException
    // Initial output
         textArea.append("File name = " + fileName_out + "\n");
         // Test if data exists
         if (data != null)
         fileOutput.println(fileName_in.getName() +"\t"+ slope+"\t"+intb+"\t"+corr+"\t"+r_sqrt);
    textArea.append("File output complete\n\n");
         else
    textArea.append("No data\n\n");
         // End by closing file
    initialcomp();
         fileOutput.close();
    private void initialcomp()
    slope=0.0;
    intb=0.0;
    corr=0.0;
    r_sqrt=0.0;
    sumx=0.0; sumy=0.0; multixy=0.0; square_x_sum=0.0; square_y_sum=0.0;
    for(int i=0;i<data.length;i++)
    for(int j=0;j<data[i].length;j++)
    data[i][j]=null;
    /* MAIN METHOD */
    public static void main(String[] args) throws IOException
         // Create instance of class FileChooser
         FileReduction1 newFile = new FileReduction1("File Reduction Program");
         // Make window vissible
         newFile.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         newFile.setSize(500,400);
    newFile.setVisible(true);
    Sorry about the long lines.
    As you can see, all input files saved in array called files, however when OpenFile1() function is called, it take input (fileName_in) as a single file not an array. I'm assuming this causes the exception.
    When there's muptiple inputs, program should take each file from getFileName() to outputToFile() sequentially.
    Does anybody have an idea to solve this?
    Thanks a lot!!

    you naming convention is confussing. you should follows Java naming convention..you have a getXXX but decalred the return type as "void"...get usully means to return something...
    your code is doing too much..and hard to follows..
    1. get the selected files
    for each selected file
    process the file and return the result
    write out the result.
    /** close the precious resource */
    public void closeResource(Reader in){
        if (in != null){
            try{ in.close(); }
            catch (Exception e){}
    /** get the total number of line in a file */
    public int getLineCount(File file) throws IOException{
        BufferedReader in = null;
        int lineCount = 0;
        try{
            in = new BufferedReader(new FileReader(file));
            while ((in.readLine() != null)
                lineCount++;
            return lineCount;
        finally{ closeResource (in);  }
    /** read the file */
    public void processFile(File inFile, File outFile) throws IOException{
        BufferedReader in = null;
        StringBuffer result = new StringBuffer();
        try{
            in = new BufferedReader(new FileReader(inFile));
            String line = null;
            while ((in.readLine() != null){
                .. do something with the line
                result.append(....);
            writeToFile(outFile, result.toString());
        finally{ closeResource (in);  }
    public void writeToFile(File outFile, String result) throws IOException{
        PrintWriter out = null;
        try{
            out = new PrintWriter(new FileWriter(outFile, true));  // true for appending to the end of the file
            out.println(result);
        finally{  if (out != null){ try{ out.close(); } catch (Exception e){} }  }
    }

  • Multiple input files to multiple file outputs

    I have a workflow that can select multiple files and zip them into a single zip file.
    What modification should I do to get a workflow that zips each of the files separately into separate zip files?
    So I can select multiple files but each file is zipped into a separate file.

    You can use a Run AppleScript action do do it - the following action can be used instead of the Finder's Create Archive action:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 335px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters}
    -- create a PKZip archive of the selected Finder item(s)
    -- if no destination folder is specified, the archive will be placed in the same location
    -- input: a list of Finder items to archive
    -- output: a list of Finder items archived
    set output to {}
    set SkippedItems to {} -- this will be a list of skipped items
    set DestinationFolder to missing value -- a Finder path to a destination folder if different
    repeat with SomeItem in the input -- step through each item in the input
    try
    set SomeItem to SomeItem as text
    if the last character of SomeItem is in {":", "/"} then set SomeItem to text 1 thru -2 of SomeItem
    set ArchiveSource to POSIX path of SomeItem
    if DestinationFolder is missing value then -- save the archive to the same location
    set ArchiveName to ArchiveSource & ".zip"
    else -- save the archive to the specified folder
    set TheName to name of (info for SomeItem as alias)
    set ArchiveName to (POSIX path of DestinationFolder) & TheName & ".zip"
    end if
    do shell script "ditto -ck " & (quoted form of ArchiveSource) & space & (quoted form of ArchiveName)
    set the end of the output to (POSIX file ArchiveName) as alias -- success
    on error ErrorMessage number ErrorNumber
    log ErrorMessage
    set the end of SkippedItems to SomeItem
    end try
    end repeat
    if SkippedItems is not {} then -- handle skipped items
    set TheCount to (count SkippedItems) as text
    display alert "Error with Archive action" message TheCount & " items(s) were skipped - workflow will continue"
            choose from list SkippedItems with title "Error with Archive action" with prompt "The following items were skipped:" with empty selection allowed
    if result is false then error number -128 -- user cancelled
    end if
    return the output -- pass the result(s) to the next action
    end run
    </pre>

  • [CRS2008] Scheduling a report to multiple file output in single schedule

    Hi,
    Is there any way in CRS2008 / Infoview to scheduling one report to multiple file output in one schedule?
    i thought maybe it can, but still not found the way.
    Says,
    I have one report say "Report by Branch.rpt", the parameter prompt is BranchCode.
    I want to generate the "Report by Branch.rpt" for every BranchCode in separate output generate file. Like, "Report by Branch.rpt" for BranchCode A, or "Report by Branch.rpt" for BranchCode B.
    So, if i run the schedule, it will generate several report based on the report parameter given.
    Hope, would find the way.
    Thanks in advance.
    Regards.
    Edited by: fritzwijaya on Sep 20, 2010 3:47 AM

    For anyone still looking, the job can be seen under the Job History option on the home screen, but not on the Job History option under the report in the catalog - i am assuming this is becasue somehow im not referencing the report correctly in the ScheduleReport request message.
    Also, the jobId returned is a parent jobId, which when used to poll the job status, always returns a 'Scheduled' status. Im now adding 1 to this ID to get the status of my job - this returns the correct status of 'Success'.
    Still hoping someone has an idea on the getDocumentData question...?
    Thanks.

Maybe you are looking for

  • Import payments into Oracle

    Does anyone know a way to import payments that were made for a set of invoices that were imported through the Payables Open Interface into Oracle Payables through an API or any other kind of interface? Basically i need to import invoices and payments

  • Header data in ALV

    Hi, I've got a requirement, wherein I need to display a few fields of the ALV page, as the header data, and the remaining as line items. How do I do.  I'm able to get all the data fields to a ALV report, how do I go?? Please help me. Thank you, in Ad

  • How to tell if WiFi is used by apps and features t...

    Hi there, I just started to use the Nokia Lumia 800 Windows Phone. To discover the phone and all it's abilities I consume a lot of data from the internet (chat messages, photo's, websites etc.) My subscription with my phone provider is limiting the a

  • BRS Import

    while upload datas in ff67 we found difficulties to uploading datas becuase it is taking too much time to upload. so we wanted to import ff67 data in shortcut method. so i went thru ff_5 to import data. but i am not knowing what method i have to give

  • Indesign Noob

    Hey guys,  I am trying to make an Indesign document cosisting of for images, that I dragged off a site and into Indesign using my Imac.  (which makes working with some of this stuff super simply compared to a PC) But when I exported the file into a j