Mainframe as sFTP server - handle EBCDIC files

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
pabitha
Member
Posts: 3
Joined: Wed Feb 05, 2014 12:56 pm

Mainframe as sFTP server - handle EBCDIC files

Post by pabitha » Wed Feb 05, 2014 1:05 pm

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 !!

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Wed Feb 05, 2014 8:48 pm

Post a bit of the file as it sits on the remote system (a few records will do).

Post the sFTP commands being used.
Have a good one

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Wed Feb 05, 2014 9:12 pm

What happens when you transfer as binary to the mainframe?
Regards
Nic

pabitha
Member
Posts: 3
Joined: Wed Feb 05, 2014 12:56 pm

Post by pabitha » Thu Feb 06, 2014 10:41 am

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

pabitha
Member
Posts: 3
Joined: Wed Feb 05, 2014 12:56 pm

Post by pabitha » Thu Feb 06, 2014 10:46 am

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.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Mon Feb 10, 2014 10:52 pm

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 . . .
Have a good one

Vikas.betu
Member
Posts: 29
Joined: Tue Feb 18, 2014 9:13 pm

Post by Vikas.betu » Wed Mar 12, 2014 11:34 pm

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 ?

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Thu Mar 13, 2014 3:58 am

And what is wrong with starting your own topic instead of tailgating someone elses topic?
Regards
Nic

Vikas.betu
Member
Posts: 29
Joined: Tue Feb 18, 2014 9:13 pm

Post by Vikas.betu » Thu Mar 13, 2014 8:07 pm

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.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others