Write file in OS/400 library

Hi everybody
I am requested to save data from ABAP to a flat file in a <b>library</b> in OS/400. The name of the library is LEISAP. Searching around, I found out that I can access it using the path /QSYS.LIB/LEISAP.LIB/ and it already has some files. I am able to read the files in this library (for example the file MPSHR01606) using OPEN DATASET FOR INPUT with a filename like /QSYS.LIB/LEISAP.LIB/MPSHR01606.FILE/MPSHR01606.MBR.
But I can not figure out how to create a new file. What I am trying to do is:
OPEN DATASET file
  FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
where file has the value '/QSYS.LIB/LEISAP.LIB/TEST.FILE/TEST.MBR', but it fails with sy-subrc = 8.
Any idea if it is possible to create a file in a libary in OS/400 from ABAP at all and how?
Thank you
Andreas

It passed quite some time since my question and I had lost track of the thread, but here is the status:
There is no native way to create the file in the library from ABAP, the only way seems to be by using native OS/400 commands. This can be executed from ABAP too using CALL 'SYSTEM', but in our case we decided to create the files at the OS level so they can be accessed from SAP like any other regular file.

Similar Messages

  • Installers failing to write files under library

    Many of the installers are failing to write files below '/library'
    Everytime i install anything from an installer like ezdrummer etc. it gives a message saying installer couldn't install some files in "/library/audio/plug-ins/vst" or something similar.
    I have tried out several things like repairing disk permissions and verfying disk with disk utility. (Verify disk stated that the disk was ok.)
    I also have a partition for Bootcamp on my system does it in anyway cause this problem? Does it have anything to do with the fact that it may just not be for the mac os x lion?
    Running Mac OS X 10.7.2 on late 2011 macbook pro (i5 processor).

    On my Mac I did find a folder /Library/Audio/Plug-ins/VST.  I would run the installer again, this time noting the exact file named in the complaint.  Then start with /Library and do a Finder File > Get Info at each level of the hierarchy down to and including the file(s) named in the message.  On my Mac all the folders in that hierarchy have these permissions: system, Read & Write, wheel, Read only, everyone, Read only.  The few files I checked in VST had the same permission, except for a few that my user in place of system and/or admin or staff in place of wheel.  What do you see?

  • I have multiple libraries on an external drive. Somehow all the iTunes library files i.e. iTunes Library.itl, xml, itdb, Media folder, etc disappeared! Only the music files remain. Now when I start iTunes w/option it can't find any of the old libraries!

    Help! I 'm using an old G4 powerbook, Mac OSX 10.5.8, iTunes ver 10. I have multiple iTunes libraries on an external drive. Everything was fine for a while, then all of the iTunes library files, i.e. iTunes Library.itl, xml, itdb, artwork folder, Media folder, etc mysteriously disappeared! Only the music files remain (thank god) So now when I start iTunes w/option key to choose a library, I can't choose any of them because iTunes won't recognize them. Because all the library stuff is missing. So can I re-create the library files? (I don't care if I lose my ratings)
    Or should I create a new empty library on the external drive, then manually move all the music files to the Media folder in the new library?
    I tried some stupid ideas like creating a new library just to start iTunes, then going into prefs and advanced, then under iTunes Media folder location, selecting the location of the old library on the external, to see if iTunes would then find all the music which is still there, but no workee.
    I'm out of ideas, and I searched the archives.
    Help! anyone?
    Scott

    I don't know if this is me adding files to iTunes when the external wasn't connected
    it is.
    is it OK to just keep deleting that library on the Air?
    i wouldn't - at least not until i
    mount the external
    point iTunes media folder location back to the external via preferences > advanced
    consolidate my library via file > library > organize library
    The ntfs hasn't seem to be causing any problems, but I've always wanted to know.
    in order for your Mac to write to NTFS drives, it needs some help by installing e.g. the NTFS 3G driver. apparently that or something similar is installed on your Mac already. preferably, it would be formatted for Mac but then windows machines would need to have e.g. MacDrive installed to recognize the drive.

  • Error while relocating (Can't write file (no space)) - Help please

    I have been having trouble relocating master files since upgrading to Leopard. The problem doesn't seem to affect only Aperture. I can happen when using Finder or another application to move files from one drive to another. Other types of files don't seem to be affected, just my library of image files.
    The copy operation runs for a while then hangs up. The application doing the copy reports an error that that's the end. Aperture gives this error message: Error while relocating (Can’t write file (no space)). The Finder reports plenty of available space on the destination drive!
    I remember seeing a thread--but can't find it now--about a problem with certain xmp metatdata embedded into files causing problems with file operations.
    Hoping for a solution!
    Message was edited by: thomas80205

    It's possible that you might have a corrupt file. Have you tried to copy different files on to the destination drive? If those files copy fine, then narrow down the offending file by copying less images at a time.

  • WARNING: Cannot "Read or Write" files on iPod

    My iPod has been behaving very curiosly as of late. For the past month a wanring has flashed up on my iTunes screen when attempting to sync music files. The warning says *"Cannot read the disk 'iPod'. Unable to read or write files"*. Despite this warning my iPod has been able to update daily podcasts without issue. However, when I recently purchased new music I could not get it to sync to my iPod. I have no problem listening to this new album in my iTunes library, but it just will not sync to my iPod. I created a playlist for it and attempted to add it, but I discovered that the iPod was not syncing the playlists either!
    In a recent attempt to remedy the problem I selected only to sync the playlist that had the new album. What happened was frightening. All my music was no longer on the iPod, with the exception of my podcasts! I tried altering the settings to return all the music, but now I am unable to add any of my music from the library.
    I am wondering if anyone has experienced this difficulty before, and if so, if they have any trouble shooting techniques. I have already been ti Apple's support page and completed the 5 recommended steps, to no avail. Any suggestions or thoughts as to what might be occuring.

    Luckily, backing up your itunes library is easy. Just duplicate the folder(s) with your music in it. (Most likely, it's user/Music/ITunes.) Once the copy is made, you might want to move it to a different part of your hard drive.
    Now, restoring your ipod WILL wipe the device. If there's anything on your ipod that isn't in your itunes library (unlikely but possible), you want to make sure you've got a copy of it somewhere before restoring.
    Before restoring, check to see if there is an update to the ipod's firmware that needs to be installed. This is a "longshot" but might help. Just click the "check for update" button on the ipod's "Summary" pane in itunes. (Current version is 1.2.3, I think).

  • Fstream can't read or write files 4GB even with -m64?

    Using C++-style streams, I have been unable to read or write files >4GB. For example, when writing 5GB in one go, I get only 1GB. The header for write uses the type streamsize for the size parameter, and according to sizeof, streamsize is 8 bytes (when using -m64). Looking at the assembly for a simple testcase, I verified that size parameter was not truncated before calling the write function.
    What makes this interesting is that I can read or write large files if I do it in the C-style (fopen, fwrite, fclose) or if I use the C++ functions and manually do it in 1GB blocks. I tried the instructions for LFS, but they didn't work and it seems like it shouldn't since this is C++ and I am building a 64-bit app. I have observed this with solaris studio 12.3 and 12.4.
    Is this a bug or am I missing a compiler flag?
    A simple testcase to expose this:
    #include <iostream>
    #include <fstream>
    #include <stdio.h>
    using namespace std;
    int main() {
      streamsize goal_size = ((int64_t) 1<<32) + ((int64_t) 1<<30);
      cout << goal_size << endl;
      char* data = new char[goal_size];
      fill(data,data+goal_size,'c');
      FILE* f = fopen("classic.data","w");
      fwrite(data,1,goal_size,f);
      fclose(f);
      fstream file("stream.data", std::ios::out | std::ios::binary);
      file.write(data,goal_size);
      file.close();

    Eh... sorry, didnt read the source close enough
    I can reproduce your misbehavior when compiling "by default" (with default -library=Cstd).
    It fails somewhat differently with Apache STL (-library=stdcxx4), which is kinda the modern version of Cstd.
    It works fine when compiling with -library=stlport4, or -library=stdcpp (-std=c++11).
    Looks like it is a deficiency of those particular STLs.
    regards,
      Fedor.

  • File Open Issues - document library pdf file to open in new browser window

    Hi
    I have a requirement to open the document library containing pdf file to open in new browser window. So far I have tried following steps but could not get it to work.
    1. Changing Document library advance setting to open the document in browser (have tried others as well).
    2. SharePoint web application setting changed as Permissive instead of Strict. Here the pdf file opens in browser but redirect from document library instead of new window(Also tried adding Target=”_blank” and no change).
    3. Executed the powershell script to adding MIME type to see if it works but no change.
    $webApp = Get-SPWebApplication http://SharePointSite
    If ($webApp.AllowedInlineDownloadedMimeTypes -notcontains "application/pdf")
    Write-Host -ForegroundColor White "Adding PDF MIME Type..."
    $webApp.AllowedInlineDownloadedMimeTypes.Add("application/pdf")
    $webApp.Update()
    Write-Host -ForegroundColor White "Added and saved."
    Else
    Write-Host -ForegroundColor White "PDF MIME type is already added."
    4. Open the Doc library and modified ALLItems.aspx to add Target= “_blank”
    5. I have already tried solutions suggested in the link:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/9db08c4a-b53c-419a-84f8-001c194d1311/how-to-open-sharepoint-document-library-pdf-file-in-new-window?forum=sharepointadminlegacy
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/530e2ea1-d77d-491c-935f-04f536e439a5/open-a-pdf-document-to-a-new-browser-in-the-document-library-web-part?forum=sharepointadminlegacy
    http://mindsharpblogs.com/todd/archive/2005/08/16/654.html
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/7b6091df-4657-4799-ba02-259ebd7e4b7c/pdf-doesnt-open-in-document-library?forum=sharepointadminlegacy
    Appreciate if there are any working solution from any of you. Many Thanks

    I found a solution which works only in the development. No idea when I compared, Browser MIME type is enabled, STRICT browser type is configured for web application. on the document library advance setting, default to open in new browser. Both configurations
    are identical but I am able to open pdf file in new window in my developing using jquery script
    http://blog.ithinksharepoint.com/2011/02/21/open-pdf-files-from-a-document-library-in-a-new-window/ but the same does not work on production server :(
    Any help experts?
    Thanks

  • Enable to have the Write File to Citadel Example working

    Did somebody already run the Write File to Citadel Example with success ?
    This exemple aims at Importing Spreadsheet Data to the Citadel Database, and is given in the NI developer Zone --> Development Library --> Labview --> DSC --> Data Logging.
    I can run the exemple as described without any visible problem. But when I look at Citadel (through MAX), I can't find any trace of the data I imported (sine_wave_one for instance). According to the SampleSpreadsheet.csv I used for import, I should find a trace in the database around the 21st of march 2002...
    But I found nothing.
    Any help?
    Thanks,
    Hélène.

    I am not sure how savvy LabVIEW programmer you are, but if you feel confident you can go ahead and try to debug the code.
    The VI based servers are running on the background. You can however make the front panel visible during the execution - not the diagram. The debugging means you have to create a few indicators on the panel that will show what is going on on the diagram.
    These are the steps the enable the front panel during the execution:
    1) Open the Write File to Citadel Server VI
    2) File>>VI properties; select Window Appearance
    3) Click Customize and check the Show FP when called and Show FP when loaded
    4) Save it and relaunch the engine!
    When you start the engine again, you should get th
    e server front panel. Once you'll have some indicators on the FP you'll be able to learn more about what is going on in the VI.
    I have noticed that sometimes the example pops up with a File dialog box. I found out this was related to a race condition in the example. I am not sure if that's what you see.
    Let me know.
    Also if the example executes you should see the tag values changing - for example the string tags starts with "Row 0", "Row 1" ...
    Is that what you see?
    Dr.Tag

  • JDBC  Adapter how to select multi format files on AS/400

    Hi all,
    i want to access a multi format file in a AS/400 Library via JDBC Adaptor. When i try to 'select * from XXXX.FILEN' i get an error "SQLException during query 'select * from XXXX.FILEN': java.sql.SQLException:[SQL7003]File FILEN in XXXX has more than one format.
    Does anybody knows how to access a multi format file in AS/400 via a SQL statement which i can use in the JDBC-Adaptor configuration.
    Thanks,
    Juergen

    Hi Jurgen,
    Check this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
    also a guess, instead of "*", can you try with column names of required columns (and make multiple queries, based on qualifiers/columns for appropriate formats within the same file)
    Regards
    Vishnu

  • Write files on a Server with an Applet

    How can I write files (like php) on my server with an applet? Can anybody explain it step for step?

    Yes... but then...? I thinked applets have no
    permission to write files...The correct sentence is: unsigned applets don't have permission to write files locally. Also, unsigned applets cannot access any other server than the one they came from. You don't seem to do either, so it might work without signing. And if you need sining, just sign it.
    What I don't know is how you can use an FTP or any other 3rd party library in combination with an applet... dunno if the user needs to have it locally or whether the applet can pull it off your server if needed.

  • I use Apple TV's screen saver with a file in my photo library.  If I install newest update - will that change anything with my using this favorite feature?  I have just under 4000 photos in that file.  What is the total # of photos it can utilize?

    I use Apple TV's screen saver with a file in my photo library.  I believe it is first generation or second Apple TV - not the newest one.
    If I install newest update - will that change anything with my using this, my favorite feature?  I have just under 4000 photos in that file. 
    And, what is the total # of photos it can utilize?  If I keep adding photos - is there a limit to the # it will utilize?

    Thank you Alan and  know you are right. I really can do all I need with my netbook and ereader and do not need the ipad. I think I just wanted something new and felt I may enjoy using it a lttle more than the netook. But it would be a waste just to buy one when I donlt acutally need it  And, donl't think it is worth the extra money for me the get the 4g wireless capability since I doubt I would really need it often.
    I may treat myself to the Ipad for the color, touchpad and fun to use but it is very expensive considering how little it will do for me no more than the things I want it for. It woudl be and expensive luxuray, I can do without. I actually  need t learn how to use more of the function avaiable first.  Maybe I should take up playing games and learning to take digital pictures so I can at least load them. If I could learn to do that and take a decent picture, I could start selling back all the "stuff" I have purchased on ebay. haha - I do have a nice doll collection, I would like to sell. I just do not have room for anything else. That was the primary purpose for the Kindle Ereader I bought and enjoy so much,
    But, I will hold onto the thought for a while and see how it goes and what other comments I get, If I think I cannot live without it, then I will have to rethink which one to buy, I coud get the 32 g if I did not have to pay for the 4g wireless. And, if I knew I could get help to teach me how to use and enjoy all the functions, I would give it more serious consideration. My granddaugther got one for Christmas and that was what got me interested in it. I love the size of the screen and it had good color and was fast. She even had an application where she could write her notes and it would convert into typed words. That was a neat feature, If you could print it?
    But thanks again for your comments and I will check later to see I get any other feedback.
    Sunny:)

  • Trying to Write Files in Java

    I've written this; it's one of three classes that work together in a java applet.
    import java.applet.*; import java.awt.*; import java.util.*;                            import java.io.*;
    class Game{Graphics run(Graphics bufferGraphics, ArrayList<Image> image, Buff buff){
    //* Game Code *************************************************************************************************************************//
         bufferGraphics.drawImage(image.get(1),0,0,800,600,buff);
         bufferGraphics.drawImage(image.get(0),100,100,400,300,buff);
         File file = new File ("Meh.dat");
         try{
         PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file)));
         out.close();
         catch(IOException ex)
              bufferGraphics.drawString("Error!", 0, 0);
    return bufferGraphics;}}
    //*************************************************************************************************************************************//If I take out
         try{
         PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file)));
         out.close();
         catch(IOException ex)
              bufferGraphics.drawString("Error!", 0, 0);
         }It works fine, but with that in there, the other two classes don't work (And it doesn't even write the file). It doesn't even give me my error message, so I'm confused.
    The I/O code works fine in a file with system.out.println, so I think it might have to do with the out method/class/whatever.
    Message was edited by:
    robertdigregorio

    On that site, it says this:
    Can applets read or write files?
    In Java-enabled browsers, untrusted applets cannot
    read or write files at all. By default, downloaded
    applets are considered untrusted. There are two ways
    for an applet to be considered trusted:
    1. The applet is installed on the local hard disk,
    in a directory on the CLASSPATH used by the program
    that you are using to run the applet. Usually, this
    is a Java-enabled browser, but it could be the
    appletviewer, or other Java programs that know how
    to load applets.
    doesn't being in the same folder/server count as no.1?Yes but in that case you need a permissions file ... don't expect your users to have that or know how to do it. If this is yours and you are running it for yourself or someone you can give the permissions file to, then no you don't need to sign it - you just need to know how to do the grants. search this site for how to do that (tutorial/t-tip/already asked question ... )

  • Write File does not accept refnum-behaviour is strange

    Hi,
    I have come across an odd thing in LV6i under Mac OS 9. When I create a data file using the New File library VI and then connect the output refnum to the input of the Write File function, there is no problem there.
    But suppose I encapsulate the New File function in another Vi, let's call it "Test New File.vi", so that there is nothing else but the library New File.vi and all its controls and indicators exposed (wired them up with the connector pane, of course). This, it seems to me, should be an exact equivalent of the original New File.vi, but it isn't. When I connect the refnum to the input of standard Write File.vi, it will deny the data input wire claiming a non-sensical error:
    You have connected two terminals of different types ->
    These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Help window to see what data type is required.
    The type of the source is string.
    The type of the sink is string.
    Oddly enough the Write File.vi does not complain about the refnum at all and does not complain about the data type, when refnum is not connected. I have attached samples to demonstrate this.
    Does anybody know, what goes on in there?
    Thanks!
    Daniel
    Attachments:
    Test New File.vi ‏31 KB
    Testing.vi ‏22 KB

    Hi Darren,
    thank you for your suggestion, but I cannot see the problem solved. I am attaching another VI here, one that I am actually trying to use. Inside, as you will observe, the datalog type input is not wired, while it still causes the came problem, when used in the previously attached "Testing.VI" (result attached now as Testing2.vi).
    Thank you very much for trying to help me!
    Daniel
    Attachments:
    New data file-DMv1.vi ‏52 KB
    Testing2.vi ‏25 KB

  • Could not write file .project

    Hi, i need help.
    I have a lot of components in a workspace but when i want to
    make a reference into them flexbuilder send me next error-messaje:
    could not write file d:\......\.project
    i have seen and this file is not an "only read" file, and i
    have permission to write it...
    I have also copy this proyect, and test it in other
    computer...
    Could you help me?
    Thanks in advance

    I have a flex 3 workspace with a lot of components
    (libraries). I need to import one of this components(library 1)
    from another one(library 2), to register a cairmgorn event in
    library 2´s controller.
    When i click with the rigtht button over library 2, and
    select in the menu, properties option, then select proyect
    references and then select library 1, when i press ok, flex send me
    the error, "could not write file /library2.../.project"
    because of that error when i restart my flexbuilder, no any
    reference is in my library 2 component.
    Also, if i try to select propertys, flex library build path,
    and then library path tab, i add proyect and select library 1
    component, flex let me select it, and press ok, but doesn't let me
    use hes propertys and components, like i not doing anything, and
    when i restart my flex builder, this library path has dissapear.
    Thanks in advance.

  • Send file to external itunes library

    Hi,
    I am running compressor 4 on my local iMac. After compressor generates the file in AppleTV format, I want to send the result to my main itunes library, which is NOT on my iMac but on a Mac mini in my local network.
    How can I tell compressor not to use the local iMac itunes library but the one one my Mac mini?
    Thanks for your help
    Taz

    Russ, I think the OP wants to add these videos to a playlist or to a playlist folder instead of the (Home) Video folder.  (Below is what is in the iTunes (media) folder.)
    I would think you would need a script to write to the iTunes Music Library.xml. And you may need a script to write to those other files too.
    As Russ mention you can navigate to the iTunes Home Video folder for the final destination for the video. I don't think you can put those videos into a playlist or playlist folder without a script. I sure if the script isn't written correctly you can mess up your iTunes library. (Personally I don't think a script can be written to do this...)

Maybe you are looking for