IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FTP ying to MainFrame


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Unnikrishnan N

New User


Joined: 22 Jul 2008
Posts: 5
Location: Iceland

PostPosted: Wed Jul 23, 2008 4:42 pm
Reply with quote

Hi,
I am trying to FTP a txt file to main frame. When I execute STOR command I get the following error, and the username is prefixed to the file name ( I am STORing the file to a directory having the name = username )
Error I get : 550-SVC99 RETURN CODE=4 S99INFO=0 S99ERROR=1156 HEX=0484 S99ERSN code X'00000FD6'. Unable to create data set BUF99NT.F1072353.TXT for STOR command.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8651
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 23, 2008 4:53 pm
Reply with quote

Post your FTP commands; it's hard to tell what the problem is without something to look at. The error message implies you're not able to create the dataset for some reason.
Back to top
View user's profile Send private message
Unnikrishnan N

New User


Joined: 22 Jul 2008
Posts: 5
Location: Iceland

PostPosted: Wed Jul 23, 2008 5:39 pm
Reply with quote

OK, Robert. Here are the commands. After establishing the connection (by sending IP and port - It wroks fine) I gave;
USER BUF99NT
PASS *******
QUOTE SITE FILE=JES
PORT <port number>
STOR <filename.txt>

Then it will hang for some time then I got the error mesasge as described above. Mean while I tried giving single quotes with the last command ie, STOR '<filename.txt>'. and got error message like
STOR fails: F1072339.TXT. User not authorized. but the user is actully authorised.
When we gave password then I got this response from Server.
BUF99NT is logged on. Working directory is "BUF99NT.".

Please shed some light. thanks in advance.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jul 23, 2008 5:44 pm
Reply with quote

First guess would be that there is no RACF profile for F1072339 so making it an unprotected resource, which of course fails.

Do you not have the option to store the file being transmitted as a valid mainframe dataset.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4651
Location: Raleigh, NC, USA

PostPosted: Wed Jul 23, 2008 5:54 pm
Reply with quote

I'm pretty sure that with FILE=JES the intent is to submit the file <filename.txt> for batch submission. I'm wondering if the use of STOR rather than PUT is causing the problem.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8651
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 23, 2008 6:14 pm
Reply with quote

When you say STOR 'F1072339.TXT' the system believes the high-level qualifier for the dataset is F1072339; if this identifier is not defined on the system you'd get an invalid user message.

When you say STOR F1072339.TXT the system prefixes the user id BUF99NT to the dataset name and attempts to create the file. The 550 response code in FTP means there's a problem -- the SVC99 classifies the problem. I suspect the problem is that you're not giving the system enough information to be able to define the dataset.

Before proceeding any further, decide (or identify) the LRECL, RECFM, BLKSIZE of the file you're building on the mainframe. You will also have to figure out how big the file is (primary and secondary space allocations) to create the correct size on the mainframe. Add the following line to your FTP before the STOR command:

Code:
QUOTE SITE RECFM=?? LRECL=????? BLKSIZE=????? PRI=?? SEC=?? CYLINDERS
where the question marks represent the values you determined earlier.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8651
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 23, 2008 6:18 pm
Reply with quote

Kevin: good catch on the FILE=JES; I missed that one. STOR and PUT are aliases of one another according to what I know of the RFC, so they should work the same.

Unnikrishnan: the question becomes, are you trying to copy a file to the mainframe or are you trying to submit a batch job to the mainframe? If you're trying to submit a batch job to the mainframe post the file contents for review to ensure the job makes sense; if you're trying to copy a file to the mainfframe the QUOTE SITE FILE=JES is absolutely wrong.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Wed Jul 23, 2008 6:45 pm
Reply with quote

I might have gotten it wrong, but from the manual .... s99ersn

Quote:

FD6 (4054)
Meaning: The specified data set was not found.

Application Programmer Action: Ensure that the data set name was specified correctly, and that the data set is cataloged in the appropriate catalog. Contact the system programmer to check if the alias entries point to the catalog. Reissue the request.
Back to top
View user's profile Send private message
Unnikrishnan N

New User


Joined: 22 Jul 2008
Posts: 5
Location: Iceland

PostPosted: Wed Jul 23, 2008 6:50 pm
Reply with quote

Robert/Kevin,
I just wanted to copy a file from my hard disk to Mainframe..But even when I try removing the 'Quote Site File=jes' the stuff is not working.

When I use PUT instead of STOR like

PUT C:\Unni\test.txt F1072356.txt
it gave me 200 port request OK..then got hanged and after few minutes I got response like 'connection closed by remote host'
Back to top
View user's profile Send private message
Unnikrishnan N

New User


Joined: 22 Jul 2008
Posts: 5
Location: Iceland

PostPosted: Wed Jul 23, 2008 6:52 pm
Reply with quote

I tried this through command line not through code..:-). I mean the Put command
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jul 23, 2008 6:55 pm
Reply with quote

Have you taken a browse through the z/OS log to see if any extra information is being displayed.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8651
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 23, 2008 6:57 pm
Reply with quote

Suggestion: predefine the file on the mainframe, before you do the FTP. This will allow you to verify the FTP can work. If you can get the file on the mainframe using a predefined file, your problem is probably one or more of the parameters on the QUOTE SITE command I gave earlier is required for a new dataset but not defaulted by your system.
Back to top
View user's profile Send private message
Unnikrishnan N

New User


Joined: 22 Jul 2008
Posts: 5
Location: Iceland

PostPosted: Wed Jul 23, 2008 8:05 pm
Reply with quote

Thanks folks,
It worked like anything..
while working with command line you need to give quote command like..
QUOTE SITE FILE=JES
But through CODE ( I am using C sharp ) it requires only
SITE file=jes
;-)
File sent Successfully.. Issue Closed ..Thank you once again!!!!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts REXX to send an email in Mainframe wi... CLIST & REXX 3
No new posts REXX to send an email in Mainframe CLIST & REXX 4
No new posts Looking for Mainframe professional Mainframe Jobs 0
No new posts Vision PLUS Mainframe opening Mainframe Jobs 0
No new posts Advice re:rejoining mainframe workfor... All Other Mainframe Topics 6
Search our Forums:

Back to Top