problem with ftp of sas program from windows to mainframe

Reply
Contributor
Posts: 42

problem with ftp of sas program from windows to mainframe

Hi Experts,

When I ftp a sas program from windows to Mainframe via below commands..

ftp ...
...
put c:\filenam.sas 'USQR.FOLD1.FOLD2.FILNAM'

The file transfers successfully and can be seen in mainframe.


ftp> put c:\filenam.sas 'USQR.FOLD1.FOLD2.FILNAM'
200 Port request OK.
125 Storing data set USQR.FOLD1.FOLD2.FILNAM
250 Transfer completed (data was truncated)
ftp: 21183 bytes sent in 0.00Seconds 21183000.00Kbytes/sec.


But it comes as a single line file.
Might be Mainframe is not recognising the carriage return and hence only 1 line is displayed in Mainframe..

Please suggest on how we can use ftp and have same file format(as was in windows) when file comes to mainframe.

Thanks..

Super User
Posts: 10,466

Re: problem with ftp of sas program from windows to mainframe

This looks like a variation of the FTP file format issue. You may need to set some options on the FTP, which may mean using a FILENAME statment. Things that may be involved could be any of ENCODING, LRECL, BLOCKSIZE, RECFM, S370V or S370VS.

The online help for FILENAME statemen, FTP access method has several examples. Without knowing host and target OS I can't guess as to specific options but a likely one is RECFM=V for variable lenght records. You may also need to set options on the FTP target system using the RCMD (remote command).

Valued Guide
Posts: 3,208

Re: problem with ftp of sas program from windows to mainframe

Classic mainframe (z/OS) is totally different to Windows/Unix.

You have:

- Ascii/Ebcdic conversion (charactersets). There are some failing issue in that.

- recordformat. Mainframe does not know CR/LF (windows)  LF (Unix) approach

  it is either Fixed (use FB) or Variable (max length 32767 use VB), B is Blockszie. The filetransferprogram must know and handle those translations and you (user/operator) has to give the instructions for that. A binary upload(no translation) will result in your message/experience. Traslating-recoding, the file will not even look like the original file. The contents viewed with TSO should become similar.

The ftp program should give something (remote help) and when failing call you OS support mainframe for assistance.

ballardw has already given some of those values.parameters.

Some parameters like dataclass and the naming convention (storageclass) should be given to you.

---->-- ja karman --<-----
Super Contributor
Posts: 358

Re: problem with ftp of sas program from windows to mainframe

Just FYI - Mainframes (z/OS) do not recognize line feed or other carriage controls from the PC world.  Most file transfer programs (3270 emulators) have options to add the correct record controls for the mainframe.  The mainframe really likes files to have a record length of 80 and a block size of 6160 (because there is very little wasted space).

I feel so old when I talk about this stuff.....

Valued Guide
Posts: 3,208

Re: problem with ftp of sas program from windows to mainframe

Just the name OS2rules  I get an old feeling too. :smileylaugh:

The time IBM was building pc's PS/2 OS/2 Token ring. Would boost Mainframe usage as more people moving to IBM needed data on the mainframe as holy central server. :smileyblush: oeps says also something about me.   

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 4 replies
  • 639 views
  • 0 likes
  • 4 in conversation