Edjob file reference

Just wondering if there is a reference for writing edjob files (*.upd). Occasionally we need to make changes to jobs en-masse, and edjob seems like the perfect tool to do so.

For what it is worth, Michael, I had the same need some time ago and was trying to get some insights from FirstLogic on how to utilize edjob.  They wouldn't give up the details then, either.  So what I had done is written a complete FirstLogic template handler using the Ruby language.  I'm not sure what your technical background is.
Basically, all templates are made of blocks, and all blocks are made of instructions, and all instructions are a parameter and argument.  So the following code basically says, "Ask the O/S for a list of all templates (.pst files).  For each one, load an instance of the template and find the IDEA Mail.dat block.  If then block was not found, next template.  If found, set to 11-2 the mail.dat version.  Lastly, rewrite the template."
Dir.glob(File.join(base,'*','.pst')).each do |fname|
  tmp = FL_Presort_Template.new(fname)
  maildat = tmp.find('Report: IDEA Mail.dat')
  next unless maildat
  maildat.find('Mail.dat version (11-1/11-2)').arg = '11-2'
  File.open(fname, 'w') { |ofile| ofile.puts tmp.to_a } if params[:write]
end
Our company has nearly 300 templates that we maintain.  The template handler allows us to cut through all those and update what needs to be changed.  More difficult changes may isolate just standard mail templates, apply changes to entry points (zip changes are the most difficult), etc...  That same logic is utilized all over in our automated systems.
dvn

Similar Messages

  • A File Reference and its evolving life!

    Hi all,
    I've noticed something that came as a little bit of a surprise to me, but I think I have the explanation, at a hand-wavy higher level anyway.  What I have not established is if this is a 'bug' or a 'feature', and if there are any ways the following issue can be avoided at the NI function/api layer.
    Consider the file open and file close function.  You open a file, you use the reference to the file to write/read data, then at some point you close the reference and the close function spits out the file-path.  Here are a couple of tid-bits you may not be aware of (that are easy to test):
    Q1) After your application opens/creates a file and starts using the file-reference to make file writes, if an external source changes the file-name of that file... guess what will happen on your next write function call?
    A1::  The write successfully updates the newly re-named file with your new data without producing an error or a warning.  (At least this is the case if your program is running on a vxWorks cRIO target and the file-name is changed directly on the cRIO via an FTP browser.)  
    Did this surprise you? It did surprise me!  -My handwavy explanation is that the file-pointer is perhaps managed/maintained by the OS, so when the OS tells the file-system to rename that file, the pointer that LabVIEW holds remains valid and the contents of the memory at the pointer location was updated by the OS.
    Q2) Continuing from the situation setup in Q1, after writing several new chunks of data to a file now currently named something completely different than when the file reference was originally created, you use the close function to close the file-reference.  What do you expect on the file-path output from the close function??  What do you actually get??
    A2::  The close function will 'happily' return the ORIGINAL file-name, not the actual file-name it has been successfully writing to(!).   This has some potentially significant ramifications on how/what you can use that output for.  At this point there is a ton of room for pontifications and more or less 'crazy' schemes for what one could do, but I argue that the bottom line is that your application has at that point completely lost the ability to accurately and securely track your file(s).  Yes, you could list a folder and try and 'figure out' if your file-name was re-named during writing and you can in various ways make more or less good 'guesses' on which file you in reality just had open, but you can never really know for sure.
    So, what do you guys think?? Is the behavior of returning the (incorrect) original file-path when you close the handle a BUG or a FEATURE??  Would it not be possible for LabVIEW to read back the data contained in the (OS?) pointer location and as needed update the file out path data when it closes a reference?  Should we not EXPECT that this would be the behavior?
    Q3)  Again, continuning from the above situation, lets assume we are back at the state in Q1, writing data to a (re)named file.  What happens if the file is deleted by an external process? What happens to the file reference? File function calls using the reference?
    A3::  This one is less surprising.  The file reference remains 'valid' (because it is a valid reference), but depending on the file function you are calling, you will get error such as error 6 (binary write reports this), or error 4 (a TDMS write will report this error), etc.  So as long as you don't rely on file ref-num tests to establish if you are good to go with a file-write or file-action, you should be safe to recover in an appropriate way.. Just don't forget to close the file-reference, even if the file is 'gone', the reference will still remain in memory until you 'close' it (with an error)(?I might be wrong about this last part?)
    I am not sure if the above is possible on e.g. Windows, Windows would probably prevent you from re-naming a file that has an open file-handle to it, but this is definitley observable on at least vxWorks cRIO targets.  (I don't have PharLap ETS or RTLinux devices so I can't test on those targets.. if you want to test its pretty straigth forward to make a simple test app for it.)
    [begin rant-mode related to why I found this out and why this behavior BITES]
    There are situations where the above situation could cause some rather annoying issues that, for somewhat contrived reasons related to cRIO file API performance, CPU and memory resource management, are non-trivial to work around.  for example, using the NI "list folder" to listing folders take a very hefty chunk of time at 100% cpu that you cannot break up, so polling/listing folders after every file update (or even on a less regular interval) is a big challenge, and if you are really unlucky (or didn't know any better) and gave the list command in a folder with 1000's of files (as opposed to less than about 100 files), the list will lock your CPU at 100% for 10's of seconds...  Therefore, you might be tempted to maintain your own look-up table of files so that your application can upload/push/transfer and/or delete files as dictated by your application specific conditions... except that only works until some prankster or well-intention person remotes in and starts changing file-names, because then your carefully maintained list of file-names/paths' suddenly fall appart.
    [\end rant]
    QFang
    CLD LabVIEW 7.1 to 2013

    Hey guys, thanks for turning out your comments on this thread!
    -Deny Access : still able to re-name (and delete) the file via FTP browser (didn't test other file avenues).  I think this is for the same reason that NI vxWorks targets (such as cRIO-9014) do not support the concept of different users with different rights, as such, everyone have access rights to everything at the OS level.  Another issue for me would be that "Deny Access" does not work on TDMS file references, so even if it worked, it would not help me.
    --> I strongly suspect that these things are non-issues or issues that can be properly managed, on the new NI LinuxRT targets since (the ftp is disabled by default) it supports user accounts and user restrictions on files/folders.  The controller could simply create the files in a tree where 'nobody else' has write access.
    Obviously nobody should mess around with files on a (running) cRIO, but customers don't always do what they are supposed to do.   
    As far as the 'resources' or overhead to update the file-refnum with the new information, this would not be needed to be done in a polling fashion, simply, when the file-close function is called, as part of that call it updates its internal register from the pointer data, so this should be a low overhead operation I would think?  If that is a true concern, a boolean input defaulting to not updating or a separate 'advanced close' could be created?
    I've included a zip with the LV2013 project and test VI's (one for tdms one for binary) that I've used. nothing fancy, but in the interest of full disclosure.  The snippet is the 'binary file' test vi, in case you just want a quick peak:
    Steve Bird's findings of (yet) another behavior on Pharlap systems is also very interesting, I think!!
    [EDIT]  JUST TO CLARIFY, on vxWorks, the re-named file keeps being successfully written to, unlike the PharLaps' empty file that Steve Bird found.
    QFang
    CLD LabVIEW 7.1 to 2013
    Attachments:
    cRIO Tests.7z ‏30 KB

  • How can I create dynamic file references in Power Query?

    Hi all,
    I'm new at using PowerQuery, and so far I like it. There's one thing I am struggling with though... Once I have set up my PoweQuery connections, I don't find an easy way to change the file to which the query is connecting. I'm using it for a monthyl recurring
    process, and every month the source data to query on woudl be different. The same in format/structure, but just a different dataset.
    Is there a way to make the source setup more dynamic? Can I for example in a parameters sheet enter the name and path of the new source file and update the queries?
    Currently the Advanced editor shows me following file reference:
    let
        Source = Excel.Workbook(File.Contents("Z:\Templates\EMEA\Source Data Tables\EMEA_EW_Source_Data_for_Power_Queries v1.xlsm")),
    Thanks in advance for suggestions

    Yes, this is something that you can do with Power Query. Here's how you can do it:
    Create a table in Excel containing your parameter value. Let's say that it has one column, called ParameterValue, and one row.
    Create a new Power Query query that gets the data from this table. Call the query something like ParameterQuery.
    In your original query you will now be able to reference values from your parameter query by saying something like this:
    Source = Excel.Workbook(File.Contents(ParameterQuery[ParameterValue]{0})),
    HTH,
    Chris
    Check out my MS BI blog I also do
    SSAS, PowerPivot, MDX and DAX consultancy
    and run public SQL Server and BI training courses in the UK

  • When trying to upload a PDF to an interactive site I get the announcement:"The attached PDF file references a non-embedded font Tahoma. Please remove file, embed the font and reattach." How do I embed this, or in fact any other font ?

    When trying to upload a PDF to an interactive site I get the announcement: "The attached PDF file references a non-embedded font Tahoma. Please remove file, embed the font and reattach."
    I could not get rid of the Tahoma font in the WORD file.
    How do I embed this, or in fact any other font ?

    Thank you very much !
    Indeed, I was unaware of the enormous number of options that can be selected when converting a WORD file to PDF.
    I went thru the settings and found the right one for embedding the fonts.
    Thanks again !
    Oren

  • Project File File References

    Does JDeveloper 9.0.4 use absolute or relative file references in its project (.jpr) files, or is it a mixture of the two? I've heard conflicting stories but have personally only ever seen relative references.

    Yes, I've tried this and have gotten a clean compile.  However, the .dll is associated with third party software intended to add controls to a form.  The form does not display in Designer though (extensive stack trace errors) which made me wonder
    whether there is a downside to this approach.

  • ERROR ITMS-9000: "META-INF/container.xml must contain one and only one root file reference."

    Hi all,
    After correcting a table-of-contents error in my .epub file, I am unable to upload it via iTunes Producer. It lists this error message:
    ERROR ITMS-9000: "META-INF/container.xml in 9780615431727.epub must contain one and only one root file reference." at Book (MZItmspBookPackage)
    The file has been verified and only has one root file reference in the container.xml file.
    Has anyone been able to find a solution to this problem?
    Thanks!

    Hello Forum Users…
    For those of you who have run into the upload roadblock, getting an error message similar to this:
    Package Summary:
    1 package(s) were not uploaded because they had problems:
              /Users/slm/Desktop/MUSIC to PICTURE for IBOOK/2012 MTP for iTUNES Bookstore/9780615600918.itmsp - Error Messages:
                        Apple's web service operation was not successful
                        Unable to authenticate the package: 9780615600918.itmsp
                        ERROR ITMS-9000: "OPS/ibooks.ncx(5): 'p50': fragment identifier is not defined in 'OPS/content9.xhtml'" at Book (MZItmspBookPackage)
    Following is a "specific" fix, but the idea of the fix will help you with your specifics too.
    I tried for 17 days to upload a book that looked and worked perfectly in iPAD via Preview.
    After many discussions with Apple, who to their credit stayed with me over 2-3 days, I decided to play a hunch.
    I went into a duplicated copy of the book and on every page, (because the error message was not telling the whole story), looked for what InDesign would call "Overset Text."
    Now... the "flaw" in iBOOK Author (hint) is that it won't advise you of this "overset text" as does InDesign.
    And to compound the matter, the exported ePUB document WORKS in iPAD Preview.
    See Screenshots from InDesign:
      Okay... Couldn't add it but it is a Warning Box that says there is overset text. (Characters which exceed the text box.)
    Nevertheless, I played this hunch, and sure enough found a few boxes with the + in them.  In other words I clicked on EVERY text holder and every text block in the entire document.
    Where I found + signs, I simply deleted some carriage returns from the iBOOK file... (please note… carriage returns and literally empty spaces that caused the overset text) and then erased all previous copies of the Music to Picture Book on my hard drive,  iTUNES and iPAD.
    The result?  A "text-book" upload with no snags!  As my Son would say… "Victory!"
    So, first make sure that you are using only PNGs, Jpegs and Movie files to iBook Specs.  Then... make sure there are no overset text boxes, which you must do manually.
    Enjoy & Godspeed!
    Steve
    Stephen Melillo, Composer
    STORMWORKS®
    209 Spinnaker Run
    Smithfield, VA 23430-5623
    USA
    v/f 757-356-1928
    stormworld.com
    “History is a vast early warning system.” Norman Cousins, editor and author (1915-1990)
    "This will be our reply to violence: to make music more intensely, more beautifully, more devotedly than ever before." Leonard Bernstein
    “If you have a chance to help someone, and you don’t, you are wasting your time on this earth.”  Roberto Clemente

  • How to make a file reference

    Applescript file reference causes me more confusion then normal in Applescript.
    How do I construct a user reference free file reference.
    -- set fn to path to file "my speaking document.rtf" of documents folder
    -- set fn to   "my speaking document.rtf" of folder "Documents" of folder "mac" of folder "Users" of startup disk
    -- set fn to POSIX file (get "~/Documents/my speaking document.rtf")
    set fn to POSIX file (get "/Users/mac/Documents/my speaking document.rtf")
    log "fn = " & fn
    tell application "TextEdit"
       open file fn
    end tell

    You could also have a look at [Aliases and Files|http://developer.apple.com/mac/library/documentation/AppleScript/Conceptu al/AppleScriptLangGuide/conceptual/ASLRfundamentals.html#//appleref/doc/uid/TP40000983-CH218-SW28] in the [AppleScript Language Guide|http://developer.apple.com/mac/library/documentation/AppleScript/Conceptu al/AppleScriptLangGuide/introduction/ASLRintro.html#//appleref/doc/uid/TP40000983-CH208-SW1].

  • Shift regsiter pass file reference problem

    Hi, I met some problem when I use shift register to store file reference, please refer to attachement.
    I want to implent the function that every hour a new file would be create, and close the old file. but the close file.vi reported error message, said error source is can't close file. other parts in the diagarm works well.
    Solved!
    Go to Solution.
    Attachments:
    chkDatalogDir_drv.vi ‏23 KB

    Are you testing this VI by itself or as a called subvi?  LabVIEW will automatically close the file reference once the top level caller stops running, even if you don't close it in code.  The ref info will remain in the shift register but it's no longer valid.  This means it passes the not a ref test but Close File can't use it.  I threw a loop around your code to keep it running(as if it were a subvi) and everything worked.
    --Using LV8.2, 8.6, 2009, 2012--

  • How to pass file reference to c

    Hi,
    I want to pass file reference pointer to a dll written in visual c++. How can i do that?

    What do you want to do with that reference in your C code? if you want to access it using OS File IO functions you have to be very careful! You should not mix LabVIEW nodes and OS platforms calls together. It's either one or the other.
    If you can guarantee that what you want to do is configure the Call Library Node (CLN) parameter to Adapt To Type. Then right click on the CLN and select "Create C Source Header" or something to that meaning. Save the resulting file to disk. Open it and copy the function prototype into your C/C++ file. There should be a parameter typed LVRefnum *. Now you can use the LabVIEW manager C function MgErr FRefNumToFD(LVRefNum refNum, File *fdp);
    You need to link your DLL with labview.lib in the cintools directory in order to be able to call the FRefNumToFD() function. The value in the fdp reference is the platform specific file handle, so for Windows this is a HANDLE.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Invalid tdms file reference

    I have a program that logs data with a tdms file.
    On my pc it works fine. When I build an exe and instal it on an other pc, I get the error:
    "invalid tdms file reference"
    Is this a problem with my vi or with the pc? 
    Attachments:
    Stikstofdroger.vi ‏50 KB

    I'm wondering about that this works at your development machine.
    You should think about attending a LabVIEW Style Guidline and LabVIEW Performance class.
    But to fix you issues regarding the tdms file path you have to change a few things:
    1. There is only a valid path when "Datalog OFF/ON" is set to true before you start the vi. You should change this by creating a new event case for the "Datalog OFF/ON" where the user then is able to start datalogging when the vi is allready running.
    2. When "Show Measurements" is set to False you write an emtpy path constant into the shift register. Why? Either you wire the path from the left tunnel to the right or you think about if it is even necessary to wire the path through the case structure at all.
    However, I would still recommend you to completely redesign your vi!
    Christian

  • The file reference 0x3000000003d66

    Hi,
    My hard drive has performed recently a chkdsk at boot. Since then, I cannot find an excel file named mdp.xlsx.
    I have the following lines appearing in the bootex.log created after completion of chkdsk:
    The file reference 0x3000000003d66 of index entry mdp.xlsx of index $I30
    with parent 0x39e8 is not the same as 0x1000000003d66.
    Deleting index entry mdp.xlsx in index $I30 of file 14824.
    The file reference 0x3000000003d66 of index entry MDP~1.XLS of index $I30
    with parent 0x39e8 is not the same as 0x1000000003d66.
    Deleting index entry MDP~1.XLS in index $I30 of file 14824.
    I was wondering whether this would help me. Thanks for letting me know what is the best path to follow to recover this file.

    Excel Recovery Toolbox is an easy application for the restoration of corrupted XLS files on any PC compatible hardware. This program can easily fix data corruption threats in damaged tables and
    offers the following to its users:
    The small size of Microsoft Excel recovery tool download makes easier the start of Excel Recovery Toolbox on offline workstations;
    Recovers fonts of tables, number formats, worksheets, columns, columns width and rows height;
    Repairs cell data of workbook, all types of formula including functions, internal, external and name references;
    Fixes the color of cells and cell borders, line styles and alignment.
    For more information:http://www.excelrecoverytoolbox.com/
    Follow these steps:
    Click Start, click Control Panel, click Programs, and then click Uninstall a program under Programs and Features.
    Select Microsoft Office.
    Click Change, and then wait while the change and repair is carried out.
    Exit after the process is completed.
    Double-click the Excel file that you want to open or open the file through an HTML link as you could by using previous versions of the program.
    That’s Microsoft advice.
    If this method didn't help, you so can try to find the answer here:
    http://social.technet.microsoft.com/Forums/en-US/e47536ee-4458-44e3-a9e0-df48fc54d32d/excel-repair-backup-copy?forum=excel

  • Relative file reference

    OK-relatively new to the product, so bear with me. Due to
    file size, I needed to link several projects together. From info I
    got here, I wanted to use a relative file reference so I could copy
    the .swf's to other computers. So at the end of each module, the
    project is to open a new file ( ..\file\file2.htm). This method
    worked fine on my computer. When I copied the necessary files to a
    different computer and the first module finished, it tried to find
    the file on my local drive. Can anyone help?

    Try using links formatted as follows:
    for files in subfolders from the calling file use
    foldername/filename
    for files in folders above the subfolder use
    ../filename

  • File Reference and XML

    Hey everyone, i've been working on an mp3 player that runs
    off of xml i have it set up so that for each instance of a song it
    attaches movie clips onto the stage that serves as buttons. I'm
    trying to add a download button so when you click it it will
    download the file. I'm trying to do this with the file reference
    class but i've been working on it for a week with no luck what so
    ever. if anyone has any ideas it would be so greatly appreciated
    heres my code and xml.
    there may be some unnecessary code in there i was messing
    around trying different things.

    Sorry if it wasnt clear. But to be completely truthful i'm
    not sure what it is thats not working. I'm trying to populate the
    file reference by the xml. everything works except when i test the
    movie online when i click the download button the save file opens
    but it says undefined and clicking save does absolutely nothing.
    So my guess is that my problem lies in my file reference to
    the button.
    this part
    var url:String = "_global.download
    _root["downloadbut"+i].onRelease = function() {
    if(!theFileRef.download(url,_global.songname.mp3)) {
    trace("dialog box failed to open.");
    } else {
    trace("dialog box has open.");
    trace(_global.songname
    i was hoping to know if anyone knew how to properly populate
    the file reference with xml.
    Sorry. Hope that is more clear.

  • File Reference Data

    HI!
    Is there a way to access a file reference data?, or do I have
    to upload de file to the server and the download it in order to get
    the file data (This sounds so much as overkilling).
    Also, is there a way to store the file reference data for
    future use, lest say I wish to keep the file reference data so my
    flash applicaction can access the same file in the future, can sore
    this, lest say in a server database or something?
    I hope people form adobe could answer this :)
    Thanks

    Peter,
    Thanks for taking your time to discus about this issue. I've
    always liked the approach flash has had to protect personal data,
    or to be more specific to completely separate Internet form the
    local PC environment. And the proof that you guys are on the right
    track is that there are no FLASH viruses yet.
    Still, and if it's possible I would like to make a few
    suggestions that shouldn't affect the security model but
    definatelly improve the way FLASH communicates with the server:
    1.- Access a File Reference locally, I'm not talking about
    accessing any file on the local PC but the one the user manually
    selected for lets say an upload (Básicaly add an open command
    to fileReference), this would be very usefull since will allow the
    SWF to process the file before sending it, wich for example will
    allow to change an image size before upload or to process a text
    file and upload only the results of this process. I don't see how
    this could be a security risk since you are able to do this with
    the server and a huge everhead today.
    2.- Been able to store the file Reference, again without
    accessing the PATH of the file, but the file reference object
    itself will be most useful to for lots applications, you don't need
    to have access to a directory structure but be able to access a
    file previously selected by the user. Just a while ago I wrote a
    flex application that uploaded a single file to a server every
    hour. I was able to store in a shared object all the paramenters a
    user selected for the upload except for the file reference. This
    meas that the user has to select the file every time it opens the
    application.

  • Funny stuff with excel file references

    I used 'create a subvi' on a portion of a diagram that is to save some data
    using the excel toolkit. The subvi had a file reference input and output.
    But now when I run it the reference seems to get corrupted (or at least not
    work right). I tried deleting the input and output reference and got new
    copies from one of the supplied excel toolkit vis but it still wont work
    right. I can get it to work by not using the output reference and just
    wiring the following vis to the input reference. But I wonder how it is
    getting corrupted. Even if the reference is not used at all in the subvi
    but is just wired from input to output it still messes it up. Anyone know
    why this is happening?

    Hi Adam,
    You seem to find alot of interesting issues.
    If you have spare time, maybe you should sign up for the BETA test program.
    Please post an example, I'd love to see this one.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for

  • Data Extraction to Cube is very slow

    Hi Experts, I am working on SAP APO project .I have created a cube to extract data(Backup of a planning area) from Live cache.But the data load is taking lot of time to load.We analysed the job log found that for storing data in PSA and in datatarget

  • Action Controls at the AppModuleDataControl level

    hi, I have a problem where in I need to make a fragment of the page and display action buttons like Create, Delete etc. In my present case i need to make the action buttons in such a way that i need to on click of new any screen in another facet shou

  • BAPI Needed for IQ01 txn

    Hi All I am uploading 1lac Serial No's for the IQ01 txn against the material. For this I am using BDC of IQ01 but its taking long time. Please suggest any useful BAPI for IQ01 txn.... << removed >> Rgds Deepanker Please read Please read "The Forum Ru

  • Installing 10.2.0.1 on REDHAT 5.3 64 bit

    Hello All, What am I doing wrong with this installation? This is a straigh forward install, and for whatever reason, after I apply the 10.2.0.4 update (64 bit) I cannot get the listener to start at all. Also, I attemped to install 10.2.0.1 on redHat

  • Stretch a graphic/layer only horiztonally

    Hi all, So here's my problem. I'm designing a site where a small beige box serves as the background for the content of each page on the site. However, my problem is that, while I'd like the rest of the content and images and shapes on the page not to