Page 1 of 1

Mainframe as sFTP server - handle EBCDIC files

Posted: Wed Feb 05, 2014 1:05 pm
by pabitha
I need a help in sFTP process, sFTP from midrange(windows/Unix) to mainframe server. The sFTP process is taken care by client people, power shell script has been used. My part is to copy the files from OMVS to mainframe datasets.

Currently we have job for copying a file from OMVS to MVS, text file from windows will be transferred to OMVS via sFTP in Binary mode. Mainframe copy job will copy the file from OMVS to MVS and does the conversion process (ASCII to EBCDIC) as well. The code page conversion used is BPXFX311 TO1047.

Problem
----------
But now the problem is that the file is already in EBCDIC format in windows and is transferred to OMVS via sFTP process. When I tried to copy the file from OMVS to MVS, the output is not as expected.

Note: Since mainframe acts as server, files are trasferred to OMVS in binary mode.

Can someone help me in handling files which are transferred from windows in EBCDIC mode .

Thanks in advance !!

Posted: Wed Feb 05, 2014 8:48 pm
by DikDude
Post a bit of the file as it sits on the remote system (a few records will do).

Post the sFTP commands being used.

Posted: Wed Feb 05, 2014 9:12 pm
by NicC
What happens when you transfer as binary to the mainframe?

Posted: Thu Feb 06, 2014 10:41 am
by pabitha
DikDude wrote:Post a bit of the file as it sits on the remote system (a few records will do).

Post the sFTP commands being used.

Text file from windows is transferred via sFTP to OMVS in binary mode. And below is the command used to copy from omvs to mvs.

OCOPY INDD(DATAIN) OUTDD(DATAOUT) TEXT CONVERT((BPXFX311)) TO1047

Posted: Thu Feb 06, 2014 10:46 am
by pabitha
NicC wrote:What happens when you transfer as binary to the mainframe?
When trasferred as binary, the file look similar to the one that is trasferred in binary mode in manual FTP process. But when compared in superc, it shows all records are different.

Also not sure how to convert the binary to EBCDIC in mainframe. Please advise.

Posted: Mon Feb 10, 2014 10:52 pm
by DikDude
Now, please go back and post what i asked for . . .

Some of the data on the non-mainframe box.

Also post a bit of the data after it has gotten to the mainframe.

If y0ou cannot / will not post what is requested, it is nearly impossible to help . . .

Posted: Wed Mar 12, 2014 11:34 pm
by Vikas.betu
I am doing FTP from mainframe to window server with the help of JCL ftp job. But now I need to get the same file from window server to mainframe server, Can anyone help in this or provide me some sample code for that ?

Posted: Thu Mar 13, 2014 3:58 am
by NicC
And what is wrong with starting your own topic instead of tailgating someone elses topic?

Posted: Thu Mar 13, 2014 8:07 pm
by Vikas.betu
I am sorry Nic, my intention was clear. I thought it's on going topic and everyone can easily search the same. Anyways I'll post a new topic for the same.