Concatenate variable to file name

I need to add today's date to zip files when copying them to an archive. I have created a global variable (Tday) that gets the date in the correct text format but have not been able to get File Move to add the MMMddyy to the incomeing file name. What is the exact syntax ODI is looking for? Thanks!

Here is the solution:
write a procedure
in its step on source command: select to_char(sysdate,'YYYYMMDDHH24MISS'),' ') arch_id,'/temp/test/' ftp_src_dir from dual;
and on the target command:
SnpsFileMove -FILE=#ftp_src_dir/#GLOBAL.g_ftp_flatfile_nm -TOFILE=#ftp_arch_dir/#GLOBAL.g_ftp_flatfile_nm#arch_id -OVERWRITE=yes
choose the technology as sunopsisAPI
and also choose commit.
Edited by: ramanajv on Mar 16, 2010 3:29 PM

Similar Messages

  • Fix variable text (File Name) when importing INDD into INDD

    More of a fix request than a new feature:
    Simply put, the variable text (File Name) shows the file extension when the document is imported into another INDD regardless of the variable text specifications in the originating document. This is unexpected and undesired.
    Please see problem description in this thread: http://forums.adobe.com/thread/489492?tstart=0

    Seconded. Currently, I don't use this variable in this way, but I can envisage future scenarios where it would be a problem.
    And it seems a strange thing to miss out on ... (why would an INDD file behave different?)

  • Preventing file extensions being added to variable text (File Name)-

    …when one imports one INDD file (v5 or 6) into another. We have the variable text specifications set to exclude file extensions. The .indd does not publish in the originating document.
    We use INDD import and the text variable "File Name" quite a lot.
    TIA-
    -Todd

    I think he's saying that when you open an ID doc, the filename variabe inside can be set to report just the name, but when you import that same doc into another ID doc, the filename variable shows the ".indd" extension.
    EDIT: Yes, that is (stupidly) how it seems to work. No idea how to fix it though. Suspect Adobe has to issue an update.

  • Concatenate sysdate with file name in shell script

    Hi,
    I have one shell script which i am using to transfer data(SFTP).
    Now I have one requirment to use sysdate along with the file name as the file name for the data being transfered.
    script is like this...
    function connect
    sftp $USER@$HOST <<END_SCRIPT
    lcd $FILE_DIR
    if [ $FILE="PO" ] then
    quote site recfm=fb
    quote site lrecl=230
    pwd
    put $FILE 'OPENPO'
    fi
    quit
    END_SCRIPT
    Can any one tell how i can concatenate sysdate with the file name (put $FILE 'OPENPO')?
    Thanks in Advance,
    RR

    it gets even easier with the 'scp' command.
    please try to use the "code" tags. it is very well possible the forum software did transform parts of your script.
    to get into 'code mode': put { c o d e } on a line (without the spaces), then the code, then { c o d e } again to switch back to normal mode.

  • High number of "The connection has timed out" errors. Where do I set the time out period (variable and file name) - windows 7

    I usually use a wireless network at home and have very few time out problems with Firefox.
    I am travelling and using Optus Wireless broadband where the average ping to a site is 700+ms .
    I suspect that this is the cause of the high number of timeouts I am experiencing.
    Optus say there are no problems so I think I will have to set the timeout to a longer period.
    Please advise what variable name/s (and in which file) the timeout is set for LOADING PAGES.
    Thanks in anticipation.
    Greg Atkinson.
    By the way the same is happening in IE8
    and on many sites other than the Yahoo one below.
    ================Full Error Page ==============
    URL is http://au.mg4.mail.yahoo.com/dc/launch?.gx=1&.rand=81jkv757qfdqt
    =========================================
    The connection has timed out
    The server at au.mg4.mail.yahoo.com is taking too long to respond.
    * The site could be temporarily unavailable or too busy. Try again in a few moments.
    * If you are unable to load any pages, check your computer's network connection.
    * If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

    Having the same problem 4 out of 5 times I try to navigate to a new site I get the error "connection has timed out".
    My I phone works fine on the same wireless connection so it must be something to do with the computer. The problem occurs on IE, firefox, and google chrome.
    I too would like to know how to how to either fix this problem or failing that to extend the length of time before the connection times out (which is currently only about 5 seconds).
    Please help!
    Thanks in advance

  • Handling variable flat file name in UNIX environment

    Dear Forum,
    I am working in a project where,
    Online systems generate flat files with variable names (followed by timestamp) and load into a Unix directory (FTP Location) for loading into data warehouse.
    Using OWB, I will have to rename those files into a static name then execute the mapping. Once the mapping is executed the the source file should be transfered to a different directory.
    I am trying to do this using a external process in OWB process flow. I found a similar reference in the link below
    http://www.oracle.com/technology/products/warehouse/pdf/Cases/case7.pdf
    But here it is shown for windows only. As I do not know unix, I could not proceed a lot with this.
    Therefore requesting you all, please help me showing how can I achive this. I think your answer will help many others along with me, looking for the same solution. Please help.
    Kind Regads
    Zakir

    You will need to logon as your Oracle owner (the userid is ORACLE, in my case), and then issue the following commands from a terminal session:
    To create a new reports server (one in addition to the default
    in-process server), use the following commands:
    export ORACLE_HOME=<whatever your oracle home path is>
    cd $ORACLE_HOME/bin
    ./rwserver.sh <newserver name>
    To start the new server, issue:
    ./rwserver.sh server=<newserver name>
    Leave the Unix session that was used to start the server logged on unless you have something like DTWM running that will keep the server running. Otherwise, if you log off the unix session, the server will end.
    Then just substitute the new server name in your line command. The difference between the in-process server and a standalone server is that the in-process server will not always stay active - it will start when it receives a request. The standalone server will stay active all the time and wait for requests.
    If the standalone server works for you, I would suggest then putting it in the correct config files to let Enterprise Manager manage it for you. If you get that far, let me know and I can tell you how to do that also. (Plus the instructions are in the Publishing Reports To The Web manual).

  • RH10 variable and build tag source file names

    I'm using RH10 and outputting to WebHelp. My company requires that I archive project source files to our CVS via Eclipse. I am not using RoboSource_Control and must use the company's development resources for archiving.
    Since archiving the initial project, I have been uploading only source files with modified dates.
    However, I have discovered that the files I thought were storing user variables and build tags are not the correct files to archive. Since I am uploading all files with a newer date and that's not working, I need to know the user variable source file name and the build tag source file name that stores the currently defined variables and build tags.
    I have already tried the WebHelp forum and was directed to this forum to pose the question because I'm looking for source file information instead of output file information.
    Thanks for your help!
    karen

    Yes, Eclipse does work that way. However, we do not use our development directory as the local Eclipse repository. I need to move changed files to the local repository (stores all source files in the project) so that Eclipse can upload changes to the server. Yes, this is planned redundancy.
    That said, it is not acceptable to spend the time copying all files in the large projects from the work folder to the local repository. I simply need to know which individual files to copy that include the currently defined variables and build tags. Note, we do not copy the SSL folder output files to our local source file repository, or other associated reference files that are not actually project source files.
    Can you find someone who knows which files I need?
    Thanks,
    karen

  • Dynamic File name in File Adapter

    Hi,
    I have a requirement to pass dynamic file name in File Adapter.
    Is there any way to pass a variable for the file name attribut in file adapter.
    I am looking for some options apart from %yyMMddHHmmss%,%SEQ%...etc
    Please suggest if any of you have information on how to put values from a variable to file name attribute in file adapter
    regards
    Saiju

    Hi Saiju,
    Yes there is.
    Assign your file name to a variable, let's say 'fileName'.
    Now go to your invoke activity(for the specific fileadapter) -> Property tab-> find a property call jca.file.FileName -> in the value field assign 'fileName' variable.
    That's it... (assuming you are using 11g)
    Arik
    Edited by: Arik on Jun 27, 2012 3:12 PM

  • How to give a dynamic File Name for Receiver File/FTP Adapter.

    Hi Experts,
        I have one scenario in which we are creating a flat file of IDOC which is coming from R/3 & sending it to FTP location. For this we have configured Receiver FTP adapter with File Name Scheme as "NT.out"  & in File Consturction mode i have given as "Add Time Stamp".
        therfore while creating a file it is creating as NTyyyyMMdd-HHmmss-SSS.out
    where as my requirement is only to to add Time & not the Date. (NThhmmss.out)
        How to do this ?
        for your info we are using ABAP Mapping.
        Pl help me
    Regards,
    Umesh

    Hi Umesh,
          Add one more field to your target structure for your file name and populate that field as per your requirement like NTyyyyMMdd.out. In receiver communication channel use Variable subtiution option and give the refrence of Payload and file construction mode set as create.
    And refer the below weblogs for Variable Subtiutuion File Name Scheme
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i - Dynamic File Name Part 1
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii - Dynamic File Name Part 2
    Hope this way would be solve u r problem.
    Cheers
    Veera
    >>>Reward points, if it is needful

  • Getting File Name in Automator workflow - combine PDF

    I am using Automator to combine 2 PDF files.
    I would like to inherit one of the file names in the new PDF and append a standard text to the front of the file name.
    I am not sure how to do this. I can combine the PDFs the way I would like, but I am not sure how to plick the file name.
    my workflow is as follows.
    Folder Action targets folder where 1st PDF is added(I want this FILE NAME).
    Ger Specified finder item selects 2nd PDF to be combined.
    Sort Finder Items makes sure the new PDF pages are ordered properly.
    Combine PDF Pages combines the pages.
    Move Finder Items saves the files where i want it.
    Name single item is whre i thought to add my standard text plus the variable of FILE NAME.
    Open File in mail to set up my email.
    Anyone can help with this?
    thanks,
    Aaron

    Here is an automator workflow that does something similar so I believe you can adapt to your needs.  This workflow is setup as a service workflow. It will combine PDFs in the order in which they are selected/clicked via the Shift key.  The default name of the combined output file will be the name of the first file clicked.  Automator can be activated by CTRL clicking any of the selected PDFs.
    1. Service receives PDF files in Finder
    2. Automator Action: Run AppleScript
    on run {input, parameters}
              display dialog "Files will be combined in the order selected via the Shift key" as text
              return input
    end run
    3.. Automator Action: Trim input items
    keep the first one
    you will need to download and install this autotmator action from here:
    http://www.menace-enterprises.com/Files/Automator/Actions/Trim%20Input%20Items.d mg
    4.  Automator Action: Run AppleScript
    (* Note & Definitions
    This Applescript extracts the basename of the first selected file without its .pdf extension
    "path_basename_ext" is full path and name, e.g. User/desktop/file.pdf
    "NmExt" is filename with extension, e.g. file.pdf
    "baseName" is the base filename without extension, e.g. file
    "Ext" is the file's extension, e.g. pdf
    on run {input, parameters}
              set path_basename_ext to input
              tell (info for path_basename_ext) to set {NmExt, Ext} to {name, name extension}
              set baseName to text 1 thru ((get offset of "." & Ext in NmExt) - 1) of NmExt
      baseName
              return baseName
    end run
    5.  Automator Action: Set Value of Variable
    define baseName as the variable
    6.  Automator Action: Get selected finder items
    Options: check ignore input
    7. Automator Action: Combine PDF pages
    choose Combine by appending
    8. Automator Action: Move Finder Items
    choose To: Desktop
    Options: check show this action when workflow runs
    9. Name Single Items
    choose Basename only to: baseName
    Options: check show this action when workflow runs
    10. Open Finder Items

  • Read file name from Payload (File Adapter)

    Hello experts,
    with Receiver-File Adapter I want to save a specific file. Name is given in the xml payload. I use Variable Substitution.
    My structure is like this:
    <root>
        <elements>
            <name>name1</name>
        </elements>
        <elements>
            <name>name2></name>
        </elements>
    </root>
    File name schema: %file%
    Variable Substitution:
        File Name: file
        Reference: payload:root,1,elements,1,name,1
    With this expression my file adapter creates two files (as recommended), but they have both the name "name1". I want to create n files with n different names, given by one xml structure. How can this task be done? Setting the occurency from "1" to "n" or "*" does not work.
    Thank you very much!
    Ilona Seifert

    Hi,
    Like pointed by you , your source strucutre,
    <root>
        <elements>
            <name>name1</name>
        </elements>
        <elements>
            <name>name2></name>
        </elements>
    </root>
    The target strucuture after mutlimapping will be like,
    My structure is like this:
    <root>
        <elements>
            <name>nameX</name>
        </elements>
       </root>
    Now, using Variable Name substitution, you will have the "name " element at a fixed level  always , <b> payload:root,1,elements,1,name,1</b> and so you Variable Name subsitution will also work fine.
    Hope it clears,
    Regards
    Bhavesh

  • File name created on run time

    did anyone face this issue that file name is created with digit?
    insert into "D:\Inbox/26"
         STUDENT_ID,
    STUDENT_NAME
    this is the code of step of inserting rows.I dont know why wrong file name is generating.I am using variable for file name.I checked the value of variable and it is correct.
    ANY IDEA ?

    Hi,
    Some ideas :
    1. Is your variable of alphanumeric datatype, with a keep all history property? If not, try with this config.
    2. Did you try with single quotes in the resource name of your datastore ?
    3. Do you run it inside a package ? (Refresh variable then execute your interface)

  • Text File Name

    I need to rename target txt file to for e.g <ORG_ID_1>.<ORG_ID_2>.<FILE_ID>.<REQ_VER>.<DATE_TIME>.DAT
    and I also need to add this file name as the first record in the target file within tag for example <TAG><ORG_ID_1>.<ORG_ID_2>.<FILE_ID>.<REQ_VER>.<DATE_TIME>.DAT</TAG>.
    How can I do this. I understand I can use the FILEMOVE object to rename the file also I can user refresh variable but how can I use this variable in the interface and how can I insert the value of this variable as the first record in the file within TAG.
    Thanks

    Hi,
    You can use 2 interfaces and the refresh variable, the first one just with the record (I´m assuming that you declare the "target file" with one column). Plus you need to change the Resource Name of your target file to "directory_tree/#VARIABLE" (however be the name of your variable)
    Interface 1
    a) put the variable in the field, set to execute the mapping in the target and then you don't need a source datastore
    b) Use the IKM SQL TO FILE APPEND and create the first line
    Interface 2
    a) Create your normal interface (source and target) using the same IKM but use the append option.
    In this way you will get a variable target file name and plus, it will be possible use the variable as first line.
    Good luck

  • Different log file name in the Control file of SQL Loader

    Dear all,
    I get every day 3 log files with ftp from a Solaris Server to a Windows 2000 Server machine. In this Windows machine, we have an Oracle Database 9.2. These log files are in the following format: in<date>.log i.e. in20070429.log.
    I would like to load this log file's data to an Oracle table every day and I would like to use SQL Loader for this job.
    The problem is that the log file name is different every day.
    How can I give this variable log file name in the Control file, which is used for the SQL Loader?
    file.ctl
    LOAD DATA
    INFILE 'D:\gbal\in<date>.log'
    APPEND INTO TABLE CHAT_SL
    FIELDS TERMINATED BY WHITESPACE
    TRAILING NULLCOLS
    (SL1 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
    SL2 char,
    SL3 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
    SL4 char,
    SL5 char,
    SL6 char,
    SL7 char,
    SL8 char,
    SL9 char,
    SL10 char,
    SL11 char,
    SL12 char,
    SL13 char,
    SL14 char,
    SL15 char)
    Do you have any better idea about this issue?
    I thought of renaming the log file to an instant name, such as in.log, but how can I distinguish the desired log file, from the other two?
    Thank you very much in advance.
    Giorgos Baliotis

    I don't have a direct solution for your problem.
    However if you invoke the SQL loader from an Oracle stored procedure, it is possible to dynamically set control\log file.
    # Grant previleges to the user to execute command prompt statements
    BEGIN
    dbms_java.grant_permission('bc4186ol','java.io.FilePermission','C:\windows\system32\cmd.exe','execute');
    END;
    * Procedure to execute Operating system commands using PL\SQL(Oracle script making use of Java packages
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Host" AS
    import java.io.*;
    public class Host {
    public static void executeCommand(String command) {
    try {
    String[] finalCommand;
    finalCommand = new String[4];
    finalCommand[0] = "C:\\windows\\system32\\cmd.exe";
    finalCommand[1] = "/y";
    finalCommand[2] = "/c";
    finalCommand[3] = command;
    final Process pr = Runtime.getRuntime().exec(finalCommand);
    new Thread(new Runnable() {
    public void run() {
    try {
    BufferedReader br_in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
    String buff = null;
    while ((buff = br_in.readLine()) != null) {
    System.out.println("Process out :" + buff);
    try {Thread.sleep(100); } catch(Exception e) {}
    catch (IOException ioe) {
    System.out.println("Exception caught printing process output.");
    ioe.printStackTrace();
    }).start();
    new Thread(new Runnable() {
    public void run() {
    try {
    BufferedReader br_err = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
    String buff = null;
    while ((buff = br_err.readLine()) != null) {
    System.out.println("Process err :" + buff);
    try {Thread.sleep(100); } catch(Exception e) {}
    catch (IOException ioe) {
    System.out.println("Exception caught printing process error.");
    ioe.printStackTrace();
    }).start();
    catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    public static boolean isWindows() {
    if (System.getProperty("os.name").toLowerCase().indexOf("windows") != -1)
    return true;
    else
    return false;
    * Oracle wrapper to call the above procedure
    CREATE OR REPLACE PROCEDURE Host_Command (p_command IN VARCHAR2)
    AS LANGUAGE JAVA
    NAME 'Host.executeCommand (java.lang.String)';
    * Now invoke the procedure with an operating system command(Execyte SQL-loader)
    * The execution of script would ensure the Prod mapping data file is loaded to PROD_5005_710_MAP table
    * Change the control\log\discard\bad files as apropriate
    BEGIN
    Host_Command (p_command => 'sqlldr system/tiburon@orcl control=C:\anupama\emp_join'||1||'.ctl log=C:\anupama\ond_lists.log');
    END;Does that help you?
    Regards,
    Bhagat

  • How to read variable file name into ODI

    Hello everyone,
    I apologize in advance if this has already been answered - I've done searches both on Google and this OTN area and have not found an answer to my query.
    I would like to do the following via ODI:
    1) rename a file in a specific directory
    2) process the file
    2) move the file to a backup directory
    3) rename the file again
    The file name is going to change everytime this process runs, as date is appended to it. I could create a variable with a system date in it and concatenate that into the filename before processing it, but I am not sure when they will run the ODI routine. Therefore, I would prefer to play it safe by doing something like a wildcard search in DOS.
    Example:
    Filename = TestFile12072010.csv
    I would like to:
    1) rename TestFile12072010.csv to TestFile.csv
    2) process the file
    3) move the file to another directory
    4) rename the file to TestFile<processdate>.csv
    I was hoping to do the first step using a DOS command that reads in TestFile*.csv. Note: I would expect there to be only 1 file with this naming convention and file extension in the directory.
    I have tried creating a stored procedure that uses the Operating System type, but it runs without stopping. I have also tried ODIFileCopy and OS Command. Obviously, I am doing something wrong since I am getting errors.
    Any guidance would be much appreciated! :)
    Thanks!
    -OS

    Issue was due to a syntax error. Case closed.
    Thanks!
    -OS

Maybe you are looking for