How Do I Use the API to Abbreviate?

How do I use the ACE API to limit the output field length and properly abbreviate the output field?
Using the pwace command-line application, I get abbreviated output that looks like this for a 30 byte field:
nnnnn GEORGE WASHNGTN MMRL HWY
However, when using the API, I end up with a truncated field:
nnnnn GEORGE WASHINGTON MEMORI
This is from the PRIM_ADDR field.
How do I use the API to get the same field value as the command-line application?
Thanks,
Rob
Edited by: rriggs on Jun 30, 2010 11:36 PM

Rob,
The jobfile product has intelligent truncation built into the product.  However, with the API this would be up for the user to code around. 
Thanks,
Brandon

Similar Messages

  • How can i add custom attributes to a new Class Object using the API ?

    Hello everyone,
    Here is my problem. I just created a subclass of Document using the API (not XML), by creating a ClassObjectDefinition and a ClassObject. Here is the code :
    // doc is an instance of Document
    ClassObject co = doc.getClassObject();
    ClassObjectDefinition cod = new ClassObjectDefinition(ifsSession);
    cod.setSuperclass(co);
    cod.setSuperclassName(co.getName());
    cod.setName("MYDocument");
    ClassObject c = (ClassObject)ifsSession.createSchemaObject(cod);
    Everything seems to be OK since i can see the new class when i use ifsmgr. But my question is : how can i add custom attributes to this new class ? Here is what i tried :
    AttributeDefinition value = new AttributeDefinition(ifsSession);
    value.setAttribute("FOO", AttributeValue.newAttributeValue("bar"));
    c.addAttribute(value);
    But i got the following error message :
    oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject
    java.sql.SQLException: ORA-01400: impossible d'insirer NULL dans ("IFSSYS"."ODM_ATTRIBUTE"."DATATYPE")
    oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewSchemaObject(oracle.ifs.server.S_LibraryObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.NewSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.createSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    void fr.sword.ifs.GestionDocument.IFSDocument.createDocument(java.lang.String)
    void fr.sword.ifs.GestionDocument.IFSDocument.main(java.lang.String[])
    So, what am i doing wrong ?
    More generally, are we restricted in the types of the attributes ? (for example, would it be possible to add an attribute that would be an inputStream ? Or an object that i have already created ?).
    Any help would be appreciated. Thanks in advance.
    Guillaume
    PS : i'm using Oracle iFS 1.1.9 on NT4 SP6 and Oracle 8.1.7
    null

    Hi Guillaume,
    you're welcome. Don't know exactly, but assume that ATTRIBUTEDATATYPE_UNKNOWN
    is used to check for erronous cases only
    and it shouldn't be used otherwise.
    Creating your own objects could be simply done via
    ClassObject ifsClassObject;
    DocumentDefinition ifsDocDef = new DocumentDefinition(ifsSession);
    // get class object for my very own document
    ifsClassObject = ClassObject.getClassObjectFromLabel(ifsSession, "MYDOCUMENT");
    // set the class for the document i'd like to create
    ifsDocDef.setClassObject(ifsClassObject);
    // set attributes and content for the document...
    ifsDocDef.setAttribute("MYFOO_ATTRIBUTE",....);
    ifsDocDef.setContent("This is the content of my document");
    // create the document...
    PublicObject doc = ifsSession.createPublicObject(ifsDocDef);
    null

  • How to do frequency division to a external signal use the api with vc

    i use the api and vc do frequency division.
    and i choose the function DAQmxCreateCOPulseChanTicks
    the problem is the parameter of sourceTermianl in DAQmxCreateCOPulseChanTicks
    i just do not how to use it, please help me ,thanks

        I can`t see your VI cause i've a lower version. I hope this VI to do what you want. 
    But now i have one question: Somebody knows why i get this message when i enable the disable diagram of the this vi? The message is attached, version is 8.0, winxp.
    Paul
    Mechatronic engineer
    Lima-Perú
    Attachments:
    FOURIER_TIME_SCALING.vi ‏25 KB
    msg.JPG ‏31 KB

  • How do I use the Kuler API?

    For more information on the Kuler APIs and guidelines for usage and application naming, see the Kuler
    Update (5/30/13): We're working to rebuild the Kuler API to offer more robust capababilities.  Until then, we're no longer issuing new API keys.  If you already have a key and are using the API, your service will not be interupted (your key will continue to work).

    Neha, thanks for your response.
    However there are two issues that I don't think have been addressed that make the old API unusable:
    1) URLs in the RSS feeds are not publicly accessible links.  For example:
    http://internal-prod-backend-1515523722.us-east-1.elb.amazonaws.com/index.cfm#themeID/5956 36
    (Copied from https://kuler-api.adobe.com/rss/search.cfm?searchQuery=blue&key=mykey)
    2) There are application errors on the thumbnail URLs.  For example:
    https://kuler-api.adobe.com/rss/png/generateThemePng.cfm?themeid=11&key=mykey
    yields: "error on line 1 at column 1: Document is empty"

  • How do I create/update an Excel file using the API?

    Hi,
    I've successfully created a "Web Intelligence" document using the API (POST /raylight/v1/documents).  However, I need to do the same for an Excel file type and have been unable to do so.  Attached are the different steps needed to accomplish this with the UI.  I need to be able to do the same thing through the API.
    I searched through the docs but haven't found anything regarding this particular aspect.
    Does anyone have a clue? 
    Thanks

    Thanks for the link.  I'm using .Net and thought the process would be fairly similar.  It is indeed, however, I'm stuck with the following error when committing on the infoStore object:
    File Repository Server error :
    ErrorCode: -2147210678
    Here's the code I'm using:
    var folderID = infoStore.Query("Select TOP 1 SI_ID From CI_INFOOBJECTS Where SI_KIND='Folder' And SI_NAME='myfolder'")[1].ID;
    var infoObjects = infoStore.NewInfoObjectCollection();
    var infoObject = infoObjects.Add(CrystalDecisions.Enterprise.InfoStore.CeKind.EXCEL);
    infoObject.Title = "Book4.xlsx";
    infoObject.Files.Add("C:\\Users\\myuser\\Documents\\Book4.xlsx");
    infoObject.ParentID = folderID;
    infoStore.Commit(infoObjects);
    I know the problem is related to "infoObject.Files.Add" because when I omit this statement, it works but the file has no content.
    Any idea why???  It's driving me crazy

  • While creating Projects Using the API, get two errors: 'Customer name must be passed' and 'class category is invalid'

    Hi
    While trying to Create Projects using the API, I'm getting two types of errors -
    The first is : 'API failed in one stage 1 Customer Name is a mandatory Quick Entry field. Value must be passed'
    The second is : '
    'API failed in one stage 1 Project: '<Project_Number>'
    The class category is invalid.'
    Both the messages are produced by our custom program. .. however I am not able to understand why the underlying errors occur.
    The first error ( Customer Name is a mandatory quick entry field), is caused by Projects that are to be created from Project templates where it is configured with Quick Entry Customer Name required. We are passing Customer Site number ( Party Bill to site number and Party Ship to side number). The site numbers being passed are also set as 'Primary'. Yet they are failing.
    For the second Error ( The Class Category is invalid), I rechecked multiple times, the Class categories for the Projects I am trying to create, with the Config in R12 and they are fine. Can't understand the reason for these two issues. Has anyone encountered such an issue ? If so how was it resolved?
    Regards
    Vivek

    HI All
    I resolved both the issues. In case there are others facing similar issues, following was the cause and resolution of my errors
    1. Error 1: Customer Name is a Mandatory Quick Entry field. Value must be passed.
    The cause was that the data loaded into our custom staging table was not in the right fields. This was because the data file values and the CTL were not in sync.
    Resolution:
    Corrected the data file to be in Sync with the structure defined in the CTL and  this loaded it successfully
    2. Error 2: The class category is invalid.
    The cause of this error was that  in the  Projects Template (used to create the project from), the Quick Entry setup had a Class Category set as required and I was not passing a value ( a class code value) for that Class Category.
    Hope this helps somebody else
    Cheers
    Turnbill

  • How can i use the shared object already present in the system from java.

    explanation:
    Actually there are shared objects present in the jdk which is used by java itself.I want to know if i can use the methods in any library file(shared object) which is already present in the system.
    Or the question can be put this way how does the java call the native methods? (Can we do that explicitly) in our code.

    It isn't entirely clear what you mean by 'shared' objects and what the relationship with these shared objects and calling native code is.
    There are no shared objects in the Java language, only the java platform.
    The platform system properties are exposed via the System class (java.lang package).
    You are free to create your own shared objects by using static member access or some other mechanism.
    Your access to methods in any of the API's is dictated by the access type you have, normally public being the only completely open access allowing complete visibility.
    You can call native methods, thats what JNI is for. Calling native methods in classes other than your own is generally done using the API provided by the developer(s) of those classes.

  • Creating LabVIEW module adapter TestStand Steps using the API without loading module prototype???

    Is it possible to programatically create a TestStand step (using the API), that calls a LabVIEW module, without loading the prototype of the module to get a reference to the Module Parameters.
    I want to specify a VI Pathname, but I dont want to use that pathname to load the prototype.  I want to programatically specify the name, type, representation etc. of each of the controls and indicators.
    My reason for attempting this is that I only want the VIs called by the steps to exist on the target hardware not on the numerous development machines running my application.
    Any thoughts greatly appreciated.
    Steve  
    https://decibel.ni.com/content/blogs/DailyCLAD

    Hi Steve,
    Unfortunatly it is not possible to do what you want within Test Stand but I am not sure why it is necessary, I think I am understanding your application incorrectly.  The only time you will need to load the prototype is if you are creating the step but if you are creating the step you will need the VI that the step calls so that VI will need to be present on the system.  If you are not calling the step then you shouldn't need to load the VI prototype.  If this is how you program funtions it may be a problem with your architecture but if not please could you correct my misunderstanding so that I can go about finding a suitable solution.
    Regards,
    Tom
    Applications Engineer
    National Instruments UK & Ireland

  • The notifications aren't update using the API of universal work list

    We use in the portal home a development iview  that works with de API of Universal Work List. This iview shows the number of notifications and tasks. While the number of tasks are updated correctly, the number of notifications are not refreshed. The only way to update the number of notifications is going and refreshing the Universal Work List iView provided by SAP.
    The API that we are using not support this case? Any suggestion?
    We haven’t found information about this.
    Our system version is 7.00 SP14
    We attachment the call that we‘ve used.
          try {
            notificaciones = tareas = 0;
            IUWLService uwlService =
              (IUWLService)PortalRuntime.getRuntimeResources().getService(
                IUWLService.ALIAS_KEY);
            UWLContext uwlContext = new UWLContext();
            IUser user = componentRequest.getUser();
            uwlContext.setUser(user);
            uwlContext.setAllowBackEndConnections(true);
            uwlService.beginSession(uwlContext, -1);
            IUWLItemManager itemManager = uwlService.getItemManager(uwlContext);
            QueryResult result =
              itemManager.refreshCacheAndGetItems(uwlContext, null, null, null);
            ItemCollection collection = result.getItems();
            for (int i = 0; i < collection.size(); i++) {
              Item item = collection.get(i);
              if ((item.isUnRead() || item.isNew())
                && item.getItemType().startsWith("uwl.notification")) {
                notificaciones++;
              } else if (
                (item.isUnRead() || item.isNew())
                  && item.getItemType().startsWith("uwl.task")) {
                tareas++;
            uwlService.endSession(uwlContext);
          } catch (UWLException e) {
            e.printStackTrace();
    Regards

    Thank you very much for your quick answer...
    But I think that you don't understand me. We can read notifications number but not in real time because they are not updated until we go to the UWL and we force there an update. We want to show in real time the number of notifications that a user has.
    Does anybody how to update/refresh this using the API?
    Thanks for your suggestions

  • How do I use the Japanese fonts in Font Book in a Pages document?

    How does one use the Japanese fonts in Font Book in a Pages document. Pages has its own fonts but I cannot get the Japanese fonts into it.

    To type japanese on a computer you change the keyboard, not the font.  Go to system prefs/keyboard/input sources and add Japanese/Kotoeri to the list, then select Hiragana in the "flag" menu at the top right of the screen, then type.  The font will take care of itself.
    http://redcocoon.org/cab/mysoft.html
    If you have any further questions, just ask.

  • How do I use the web cam on my pc? Hp w2007 I have windows vista

    How do I use the web cam on my pc?  Hp w2007 I have windows vista

    Hp w2007 is a HP monitor without webcam ...
    Where is the webcam?
    V.
    *** Say 'Thanks' with Kudos ***

  • How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    unless i'm missing something, i think you got mixed up, this is easy google for walk throughs
    i'm assuming this is the new 3tb tc AC or 'tower' shape, if so, its wifi will run circles around your at&t device
    unplug the at&t box for a minute and plug it back in
    factory reset your tc - unplug it, hold down reset and keep holding while you plug it back in - only release reset when amber light flashes in 10-20s
    connect the tc to your at&t box via eth in the wan port, wait 1 minute, open airport utility look in 'other wifi devices' to setup the tc
    create a new wifi network (give it a different name than your at&t one) and put the tc in bridge mode (it may do this automatically for you, but you should double check) under the 'network' tab
    login to your at&t router and disable wifi on it
    add new clients to the new wifi network, and point your Macs to the time machine for backups

  • How can I use the old Apple TV with new iTunes?  It tells me to input a code in iTunes but iTunes no longer has a spot to input this code to allow sync.  I can access the iTunes Store fine, just none of my Library

    How can I use the old Apple TV with new iTunes?  It tells me to input a code in iTunes but iTunes no longer has a spot to input this code to allow sync.  I can access the iTunes Store fine, just none of my Library

    read this
    https://discussions.apple.com/message/20429789#20429789

  • How do I use the adjustment brush to mask and not turn my item green?

    I have shot some products for my web site.  I need completely white backgrounds. I have tried to mask the product and lighten the whites, but when I click done, my product has turned very green.
    Why?  How do you use the brush?  Also, where is the invert to make this easier on me?
    Kind of urgent, I need to get these items on my site already.
    I know the answer is simple... I just don't know what it is.
    Thanks

    Have you tried without the adjustment brush, by simply adjusting white balance from the basic tab in develop?
    Click on the eye dropper tool and then click on a neutral gray color. Use the background if it is neutral rather than white. You may need to keep selecting the eye dropper to click in a few different places for best results.
    If you decide to use the adjustment brush you can show or hide the mask. Uncheck the mask when you have finished painting; then use the sliders, starting with tint and temperature.

  • HT4241 How do I use the mini deplayport to hdmi

    How do I use the mini displayport to hdmi on my tv?

    You use something like this:
    http://www.amazon.com/Mini-DisplayPort-HDMI-Adapter-Cable/dp/B003OC6LWM/ref=sr_1 _1?ie=UTF8&qid=1365115124&sr=8-1&keywords=minidisplay+port+hdmi
    Ciao.

Maybe you are looking for