|
Peter, The only reason that it work without the leading slash is because by chance your working directory happens to be / (root). I'd be willing to bet that the home directory specified in your profile is '/home/usrname' and that it doesn't currently exist. If this directory gets created, for instance you install and start using WDSCi. Then instead of your working directory default to / (root) it will be your home directory. At this point, your program would no longer work as it will be looking for a file /home/usrname/qsys.lib/qtemp.lib/temporary.file/temporary.mbr What Scott is saying is that you should _ALWAYS_ fully qualify the path when dealing with the QSYS.LIB file system of the IFS. That means always use the leading slash. Remember the IFS is just like DOS/Windows/Linux/Unix. A fully qualified path starts with a lead / which is the root directory of the file system. If the lead slash isn't there then you are dealing with relative path names that are subject to the whim of the directory you are currently in. HTH, Charles Wilt -- iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121
-----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Peter Vidal Sent: Thursday, August 17, 2006 3:33 PM To: Midrange Systems Technical Discussion Subject: Re: Copy just the first record with CPYFRMIMPF ===================== ===>: "This code will only work if your current directory is /." I have to say that this command worked like this. The variable I use is &PATH (equals to the full object path name), which is... /TEST/2006_08_04_pay[1].20060804.013057.txt ... and use this command (as a work-around solution) like this: CPYFRMSTMF FROMSTMF(&PATH) + TOMBR('QSYS.LIB/QTEMP.LIB/TEMPFILE.FILE/TEM+ PFILE.MBR') MBROPT(*REPLACE) This is working. You are correct when you say I was requesting to pull just "one" record at the beginning but I also explained what my ultimate goal was to know what file I was reading so I can do specific steps, depending on that fact. This is a work-around solution and this is the type of ideas I was looking for. ===================== ===>"PLEASE DON'T BE A FOOL, it only takes a second to fix the problem, why do iSeries people INSIST on doing this wrong?" Sometimes, when we discuss topics on email, is a little difficult to get to a point that we all can talk the same language. Probably my intellect and experience level is not as high as you have and I may have missed your guidance in some concepts. For example, I was never exposed to the QSHELL solution until yesterday. Probably I am alone in this ship but maybe there are more in the room that want to learn but do not have that level of knowledge yet. It is definitively true that we will get there. Is a matter of time and I can deal with it. In the mean time, I will keep on living under the motto: "the dumber question is the one I do not ask." ===================== ===> "This is the correct syntax: TOMBR('/qsys.lib/qtemp.lib/temporary.file/temporary.mbr')" Even though I did not write the '/' symbol before the QSYS.LIB parameter, somehow the system did the right interpretation and worked correctly. This is a screen shot of the message written in the joblog: Message ID . . . . . . : CPCA081 Severity . . . . . . . : 00 Message type . . . . . : Completion Date sent . . . . . . : 08/17/06 Time sent . . . . . . : 14:13:00 Message . . . . : Stream file copied to object. Cause . . . . . : Stream file /TEST/2006_08_04_pay[1].20060804.013057.txt was successfully copied to object /QSYS.LIB/QTEMP.LIB/TEMPFILE.FILE/TEMPFILE.MBR in CCSID (Coded Character Set Identifier) 37. Peter Vidal PALL Corporation / SR Programmer Analyst, IT Development Group 10540 Ridge Rd., Ste 203, New Port Richey, FL 34654-5111 http://www.pall.com "If it's worth doing, it's worth doing right."- Anonymous
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.