I need IFS How to use, for Dummys

80 pts.
Tags:
IFS
IFS Commands
IFS Directory to iSeries Folder
IFS Folder
IFSFile
I would like to save a PDF object to the IFS.  I am looking for basic information on "how to" get things to, and from, the IFS.  Is there a good website for this?  Or can someone give me some basic code to send a pDF object to a directory?  Right now, I am just playing around with cmds in a CL and then calling the CL, just to get my PDF object to the IFS.  The PDF is going to be on a network drive, which is right now called our G Drive, what is available to everyone on the network.  I am trying to pull a PDF file that I put there, and send it to a directory on the IFS.  I am not sure if I can do this calling the CL program, or if I need to do a loging, such as you do when you FTP.  I tried CPYTOSTMP and now I tried CPY.  So as you can see, I just need some basic starting information on how to even use the IFS.

 

  CPY        OBJ('G:DAILY_DROPBOXCARTON_TEST.PDF') +                   TODIR('TESTDIRTEST.PDF')                

 



Software/Hardware used:
,IIBM i, V5R4

Answer Wiki

Thanks. We'll let you know when a new response is added.

Try this:

CPYTOIMPF FROMFILE(Lib/Filename) +
TOSTMF(‘/HOME/DIR/FILENAME.PDF’) +
MBROPT(*ADD) STMFCODPAG(*PCASCII) +
RCDDLM(*CR) DTAFMT(*DLM) +
DATFMT(*ISO) TIMFMT(*ISO)

We use this for .CSV though. You may have to change some of the parameters on the command.

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Well, you aren't going to be able to reference any "G:" drive on your AS/400. No "G:" drive exists there. However, your G: drive is mapped over some shared directory, and that share has a fully-qualified path behind it or the share itself is available from your iSeries. Assuming that you have a profile available on your iSeries that has the ability to authenticate to the Windows system that presents the share, you should be able to see the .PDF by navigating through WRKLNK into the /QNTC file system. The most basic command would be:
    WRKLNK '/QNTC/*'
    That should list all available Windows share in the same network. Your .PDF needs to be in one of those. If it's not available as a share, then it will get more complicated. Do you have the link available from your iSeries? Can you locate the .PDF with the WRKLNK command? Tom
    125,585 pointsBadges:
    report
  • Dobie
    When I check the object links on QNTC, there is nothing there. Work with Object Links Directory . . . . : /QNTC The "G" drive is a mapped network drive, where we FTP docs from the AS400 to it for various things. I just thought I would start with trying to move a PDF file from the "G" drive into a folder in the IFS.
    80 pointsBadges:
    report
  • TomLiotta
    When I check the object links on QNTC, there is nothing there. "Nothing there" has a couple possible causes. One cause would be that NetServer and/or the host file server isn't configured properly, or isn't active. There are no Windows servers nor shares from the network being detected. You should at least see a "." and a ".." directory under the 'Object link' column when you run WRKLNK over /QNTC. I don't have a system handy that has never run NetServer nor one that doesn't have it at least configured, so I can't be sure what would be listed. Do you see the 'dot' directories in the list? What system hosts the G: drive in your network? Tom
    125,585 pointsBadges:
    report
  • Dobie
    There are no "..." under object link on WRKLNK "/qntc" Opt Object link Type Attribute Text qntc DDIR I did check a few things that I have seen mentioned to verify if Netserver is running. - QSERVER is running - QZLSSERVER is NOT running - QNPSERVD is running in QSYSWRK. We use EXTOL, which I know uses the IFS. I can see their directory ( among others) when I do WRKLNK. (Also another package, ACOM ) If they can access it, how come I cannot get to it? The "G" drive is on a different server, which is mapped to everyones "G" drive letter.
    80 pointsBadges:
    report
  • TomLiotta
    The list should look something like this:
    Opt   Object link            Type     Attribute    Text
    __    qntc                   DDIR
    Once that list displays, type option 5(=Display) to display what's inside of /QNTC. I should have been more clear at the beginning. When you issue WRKLNK against a single object, that's what you get -- that object. If the object is a directory, you need to explore, or expand, it with option 5. Display a directory is how you list the objects contained in the directory, including subdirectories. You could go to the list of objects directly by running:
    WRKLNK '/QNTC/*'
    The quotes are needed around names that contain characters such as slashes because you are coming in through the native command interface rather than one of the shell interfaces. Alternative interfaces are a little later. The object type for QNTC shows as DDIR, which is a 'distributed directory'. It indicates that QNTC involves networking. The leading slash is needed in order to indicate that you are looking at a top-level directory. If you simply tried the command like this:
    WRKLNK 'QNTC'
    ...or:
    WRKLNK QNTC
    ...it would be a request to work with an object in the current directory path of your job. Your default current directory is probably a /home directory such as /home/Dobie or whatever your user name is. It's pretty unlikely that an object named /home/Dobie/QNTC exists. If you display the /QNTC directory, it should display the list of servers that can be reached in the Windows network. Each one should appear as another, lower-level, distributed directory. Assuming that you are signed on to the AS/400 with a user ID and password that matches what is needed by the Windows system, you can continue exploring with option 5=Display. If your user ID or password doesn't match, the system can't make the automatic logon work for you, and you'll need some extra credentials to go farther. That should give you enough to think about and enough to try a couple things. If you hit an obstacle, ask about it here. We'll take another couple steps next time. Tom
    125,585 pointsBadges:
    report
  • Dobie
    [...] How to use IFS for dummies [...]
    0 pointsBadges:
    report
  • Dobie
    I found out that the setup of our netserver start job, was setup using an IP address that is no longer valid. The system admin is currently checking into this. In the meantime, I was able to FTP a PDF file to a folder on the IFS ( using FTP), however, it was saved as a STMF not a PDF file. So when I sent the "pdf" file to a network printer, using FTP, it printed all the STMF stuff, no PDF document. So I know I am missing something further in my transfers. To copy to the IFS I use: bin namefmt 1 get tc_boms/Carton.pdf /testssg/Carton.pdf quit To FTP to network printer I am using: bin namefmt 1 put /testssg/Carton.pdf quit Can anyone offer any further help?
    80 pointsBadges:
    report
  • TomLiotta
    ...it was saved as a STMF not a PDF file. A .PDF is a STMF. So when I sent the “pdf” file to a network printer, using FTP, it printed all the STMF stuff,... If you FTP tc_boms/Carton.pdf to the same printer, does it print as a .PDF would? Wht do you mean when you say "it printed all the STMF stuff"? Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following