I would like to be able to use this FTP command. I keep getting invalid kind of errors returned. I have *ALLOBJ authority on both systems. But yet I believe there is some kind of authority issue.
What do I have to do on either / both systems to get this FTP command to work. What I want to do is simply change the object description on a *SAVF file that I just FTP'd.
Software/Hardware used:
iseries / AS400 or whatever it is called
ASKED:
July 30, 2010 12:28 AM
UPDATED:
October 5, 2010 3:23 PM
What FTP client are you using? What FTP server are you connecting to?
Are you connecting one AS/400 to another AS/400? From a PC to an AS/400? From an AS/400 to a PC server?
Different servers allow different subcommands. RCMD is recognized by the FTP server on AS/400s but not necessarily on any other system.
If the FTP is on an AS/400, is there an exit program active for the server exit point? Does WRKFCNUSG show any usage rules for QIBM_QTMF_SERVER_REQ_9?
Tom
I keep getting invalid kind of errors returned.
Unfortunately, that doesn’t tell us much. What error do you receive? What does the FTP RCMD look like? (At what point in the session do you enter it?)
Tom
I am going from AS/400 (V4R5M0) to AS/400 (any level). The WRKFCNUSG *CMD is not valid on my system (V4R5M0). On most destination systems the *CMD is valid and I doubt they have been changed. QIBM_QTMF_SERVER_REQ_9 does not show any entries for any users. Even when I send to a V4R5M0 systems it does not work. Here is command I used (Sending *SAVF from a V4R5M0 to a V4R5M0 system).
User id and password
NAMEFMT 1
BINARY
PUT /QSYS.LIB/IOCAT.LIB/TO.CA0233A.SAVF /QSYS.LIB/IOCAT.LIB/TO.CA0233A.SAVF
QUOTE RCMD CHGOBJD OBJ(IOCAT/TO.CA0233A) OBJTYPE(*FILE) TEXT(‘TEST DESCRIPTION’)
QUIT
Here is FTPLOG showing error after the PUT command to send the *SAVF was sent ok.
250 File transfer completed successfully.
124080 bytes transferred in 0.148 seconds. Transfer rate 835.907 KB/sec.
Enter an FTP subcommand.
> QUOTE RCMD CHGOBJD OBJ(IORTD/TO.CA0233A) OBJTYPE(*FILE) TEXT(‘TEST DESCRIPTION’)
500 Subcommand **** not valid.
Enter an FTP subcommand.
> QUIT
221 QUIT subcommand received.
This may be of some help.
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/raiq/raiqclientsucommands.htm
500 Subcommand **** not valid.
Is that the actual message text? I.e., does it have “****” in the text itself?
That ought to be TCP11F6 in message file QTCP/QTCPMSGF. It should have “RCMD” where you show “****”, if RCMD is actually invalid on your system for some reason. If it has asterisks, it makes it look as if there might be an invalid character in there.
Does RCMD show the same error when you try a basic interactive FTP session?
Tom
If you connect an interactive FTP session to the system that gave the error message, what is the result of running:
Tom
I pasted this link http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/raiq/raiqclientsucommands.htm
Into browser and could not find the topic you wanted me to see.
Yes ***** was in the message text.
I tried to get to http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/raiq/raiqclientsucommands.htm
But it said topic was not found.
Yes, the message had **** in the text
I enter command and here is what I get.
> help server rcmd
214-RCMD <OS/400 command>: Runs a system command on the remote system.
214-Example: RCMD ADDLIBLE QUSRSYS.
214 More information is available in the TCP/IP Configuration and Reference, SC41-5420
So then I tried these commands
> RCMD ADDLIBLE QUSRSYS
Subcommand ‘RCMD’ not valid.
For a list of available FTP subcommands, enter subcommand HELP.
> rcmd help
Subcommand ‘rcmd’ not valid.
> RCMD HELP
Subcommand ‘RCMD’ not valid.
Note that RCMD is “remote command”. That is, it needs to be executed by the remote system rather than the one running your session. Therefore, it needs to entered as:
The QUOTE FTP subcommand is what causes it to be sent to the other system for execution.
Tom
I get same results using QUOTE
Here is what I ran interactively.
> QUOTE RCMD ADDLIBLE QUSRSYS
500 Subcommand **** not valid.
Still no luck… it just does not work.
It used to work a long time ago….
I thought going above V4R5M0 had something to do with it….
I am at V4R5M0 but no… I tried goint to a V4R5M0 system and it does not work.
This will not be a lot of help but I did some testing.
On V5R2 I successfully used QUOTE RCMD ADDLIBLE QUSRSYS
1) From Windows XP to AS400
2) From AS400 to AS400 (the same box so you would expect it to work)
3) Again AS400 -> AS400 with no special authorities user.
The only way I can make that error message come up is to actually enter QUOTE **** ADDLIBLE QUSRSYS
Try an interactive FTP to the box itself instead of inter-system.
Use exactly QUOTE RCMD ADDLIBLE QUSRSYS
See if RCMD is recognized then.
Try doing a namefmt command first.
This FTP subcommand:
…should always fail regardless of the remote platform. Anything but an AS/400 should probably reject RCMD; and essentially every AS/400 should have ADDLIBLE QUSRSYS fail because QUSRSYS should already be in the FTP job’s library list in the system portion.
But the “****” part isn’t making sense at all.
…a namefmt command first.
A NAMEFMT should have no relationship to RCMD.
What are the QCCSID, QCNTRYID, QKBDTYPE and QLANGID system values on the local and remote AS/400s? And come to think of it, what are the “Keyboard language type” and “Character identifier” setting for your workstation device?
I can only guess that somehow a character translation issue is causing the “RCMD” characters to be translated incorrectly. It’s an extreme long-shot.
Tom
Check the joblog on the remote system when running the ftp. There will be jobs called QTFTPnnnnn.
I ended the TCP server and here is error I see in job logs
TCP3D08 Diagnostic 20 06/04/10 22:26:07.817384 QTMFSRVR QTCP *STMT QTMFSRVR QTCP *STMT From module . . . . . . . . : QTMFUTIL From procedure . . . . . . : qtmf_IssueMessage__FPcT1ie Statement . . . . . . . . . : 331 To module . . . . . . . . . : QTMFUTIL To procedure . . . . . . . : qtmf_CheckAAFunctionUsage__FPci Statement . . . . . . . . . : 223 Message . . . . : FTP problem when using the QsyCheckUserFunctionUsage API. Cause . . . . . : Exception CPF2204 occurred when calling API QsyCheckUserFunctionUsage for FTP Applications Administration function QIBM_QTMF_SERVER_REQ_0. Recovery . . . : Check the job log or the system operator log for other messages.Then I started FTP server and ran this FTP job.
USERID PASSWORD
NAMEFMT 1
BINARY
PUT /QSYS.LIB/IOFBP.LIB/TO.FB0246A.SAVF /QSYS.LIB/IOFBP.LIB/TO.FB0246A.SAVF
QUOTE RCMD CHGOBJD OBJ(IOFBP/TO.FB0246A) OBJTYPE(*FILE) TEXT(‘NEW TERMS CODE PROCESS’)
QUIT
The *SAVF was sent but the QUOTE RCMD failed. Here is job log in server.
Message ID . . . . . . : TCP3D2C Severity . . . . . . . : 10 Message type . . . . . : Diagnostic Date sent . . . . . . : 09/04/10 Time sent . . . . . . : 11:43:21 Message . . . . : Secure connection error, return code -95. Cause . . . . . : Secure Sockets Layer (SSL) function SSL_Init_Application returned code -95: Value Description ----- ----------------------------------------------------------- -95 No keyring file was specified.Does this help. Could RCMD require some kind of SSL thing and PUT does not. Do I need to do something related to SSL.
Do I need to do something related to SSL.
No. That’s normal, and it’s probably expected in your configuration.
Try FTPing to the local system (back into the system you’re on) and try RCMD. Report the result back here. Also, FTP to the remote system and run this before trying RCMD again:
Report the result here too.
Tom
When I sent file and did QUOTE RCMD to myself, it worked. The file was send and I was able to change its description via RCMD.
I started and interactive session and ran the QUOTE SYSTEM and it returned
215 OS/400 is the remote operating system. The TCP/IP version is “V5R3M0″.
I then sent the *SAVF, got back message –>250 (File xfer ok)
Did the QUOTE SYSTEM , got back message –>215 (TCPIP version is V5R3M0
Did QUOTE RCMD, and got back message –> 500 Subcommand **** not valid.
Got any other ideas.
…is there an exit program active for the server exit point?
The above question still is open. Run this command on a system that does not accept RCMD:
Take option against the exit point to see if any programs are registered.
I’m not sure how an exit program could cause the behavior, but It can be tested.
When I sent file and did QUOTE RCMD to myself, it worked.
That’s evidence that it isn’t your FTP Client function that is at fault. Not conclusive, but still evidence. It wasn’t totally clear from earlier comments if there was consistency among various systems.
Tom
I ran “WRKREGINF QIBM_QTMF_SERVER_REQ” on both systems.
Both are identical. Neither one has an exit pgm.
Exit point . . . . . . . . . . . . . . : QIBM_QTMF_SERVER_REQ Exit point format . . . . . . . . . . : VLRQ0100 Exit point registered . . . . . . . . : *YES Allow deregister . . . . . . . . . . . : *YES Maximum number of exit programs . . . : 1 Current number of exit programs . . . : 0 Preprocessing for add . . . . . . . . : QTMFADDP Library . . . . . . . . . . . . . . : QTCP Format . . . . . . . . . . . . . . . : ADDP0100 Preprocessing for remove . . . . . . . : QTMFRMVP Library . . . . . . . . . . . . . . : QTCP Format . . . . . . . . . . . . . . . : RMVP0100 Preprocessing for retrieve . . . . . . : *NONE Library . . . . . . . . . . . . . . : Format . . . . . . . . . . . . . . . : Allow change . . . . . . . . . . . . . : *NOCould this be a firewall issue?
Can it allow a PUT or GET but not a QUOTE RCMD
Hal
I use a VPN connection and Client Access to get to the AS400. I then FTP from the office AS400 to the Customer’s AS400. I cannot get the QUOTE RCMD to work going to any customer’s AS400. To prove that this problem is with the office AS/400, I dropped the VPN connection and I started a FTP session directly from MY PC to the customer’s AS400. I then executed the same QUOTE RCMD and it worked. So the problem is not with the customer’s system.
I believe the problem is with our firewall on the AS/400 or the network gateway to the internet. What do I tell our nework guy to do or check on the firewall so that the QUOTE RCMD function will work.
I believe the problem is with our firewall on the AS/400 or the network gateway to the internet.
The only common networking issue that is normally related to FTP should be a network setting that mandates PASSIVE mode. But there should be other indications if that’s involved. Then again:
It used to work a long time ago….
FTP functioning was changed during the V4R2 to V4R4 timeframe to accommodate routers that were configured to require PASSIVE connections. I’ve never heard of any relationship with RCMD, but you can insert this near the top of your script:
I wouldn’t expect success because the remote server does respond to RCMD. It does receive the subcommand; it just can’t figure out what it is. If networking was somehow blocking the subcommands, then the remote server should never send a response.
You looked at the FTP server exit point on the remote system, and we can eliminate any interference by an exit program. The Current number of exit programs was shown as zero. Do the same thing on your office AS/400 for the QIBM_QTMF_CLIENT_REQ exit point just so we can get the lack of an exit program logged here.
The “****” in the returned message is still a puzzle. Please also go back to an earlier question:
It might be possible that some odd CCSID incompatibility is making the characters “RCMD” unreadable. Changes in CCSID handling around V4R5 and V5R1 might be involved. When you connected to your own FTP server, RCMD worked okay. But your Client and Server were running on the same system, so they would naturally understand each other.
Changes with CCSID processing on AS/400s happened while various Unicode/UTF changes were going on in Windows and other platforms. Everybody needed to keep talking to everyone else. Your V4R5 system might be improperly configured for network translation to newer systems. The majority of AS/400s were wrongly configured, so it’s not a stretch that yours might be. The trick would be in making it work.
But I would expect that others have long since run into the “****” symptom if it arose in the CCSID changes, and there don’t seem to be any others. That kind of argues to me against a CCSID incompatibility. It just might be a particular CCSID combination between your office system and customers, so comparisons should be done.
Tom
I tried adding the SENDPASV 1
I get same results.
Answers to question you asked:
QIBM_QTMF_CLIENT_REQ has no exit programs
QCCSID is 37 but 65535 on customer’s system
QCNTRYID is US on both
QKBDTYPE is USB on both
QLANGID is ENU on both
Keyboard language type . . . . . . : USB
Character identifier . . . . . . . : 697 37
I just tried changing my job CCSID to 65535 and tried FTP interactively.
I get the same results. QUOTE RCMD did not work.
I cannot believe that we cannot get this FTP QUOTE RCMD to work.
Can anyone verify that this set of FTP commands do work…
CoderHal,
I had to change library and file name, but I was able to verify that your FTP code does work.
Both of my IBM i’s are at V6R1.
Hope this helps,
Bill Poulin