sftp到主机主机 [英] sftp to Mainframe host

查看:91
本文介绍了sftp到主机主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我有点困惑.当我想通过sftp在PC和大型机主机之间交换数据时,需要哪些必要的步骤来实现这一目的.

Right now i'm kinda confused. When I want to exchange data between a PC and the Mainframe host via sftp, what are necessary steps to realise this.

我无法直接连接到主机.人们告诉我,有一个类似OMVS的环境,我必须先将文件发送到该环境,才能通过sftp从服务器获取数据.(已使用z/os并正在运行)

as far as I know I can't connect directly to the host. People told me that there is something like an OMVS environment and I have to send the files first to this environment to get the data from the server via sftp.(z/os is used and running)

这是对的吗?什么是OMVS?在主机和OMVS之间交换文件需要什么步骤?还是有更好的解决方案?

Is this right? And what is OMVS? and what steps are necessary to exchange files between host and OMVS? Or are there better solutions?

预先感谢

推荐答案

什么是OMVS?

And what is OMVS?

OMVS是Open MVS的缩写. z/OS Unix;您可以将其视为Unix,其中包括过去半个世纪开发的所有祖先的OS/360,MVS和z/OS. OMVS也称为Unix系统服务.它不是单独的操作系统,还是在单独的LPAR或VM中运行.它是您处理的独立文件系统,符合Unix约定.因此,它具有目录并且区分大小写并具有属性位.

OMVS is short for Open MVS. z/OS is Unix; you can think of it as a Unix that includes all that ancestral OS/360, MVS, and z/OS stuff developed over the last half century. OMVS is also called Unix System Services. It's not a separate operating system, it's not running in a separate LPAR or VM. It is a separate file system that you deal with, one that conforms to Unix conventions. So it's got directories and is case sensitive and has attribute bits.

您可以在TSO READY提示符下键入OMVS,以获取3270风格的Unix shell.您可以使用PuTTY连接到z/OS主机以获得更标准的Unix Shell.

You can type OMVS at a TSO READY prompt to get a 3270 flavored Unix shell. You can use PuTTY to connect to a z/OS host for a more standard Unix shell.

在主机和OMVS之间交换文件需要什么步骤?或者 有更好的解决方案吗?

what steps are necessary to exchange files between host and OMVS? Or are there better solutions?

这取决于. Dovetailed Technologies Co:Z SFTP服务器具有扩展功能,可以将标准z/OS数据集直接传输到z/OS主机或从z/OS主机直接传输.

It depends. Dovetailed Technologies Co:Z SFTP server has extensions that allow transfer of standard z/OS datasets directly to/from a z/OS host.

如果您的技术人员坚持要使用OMVS文件系统,那么您将需要具有

If your technical people insist on going through the OMVS file system, then you will need mainframe security credentials with an OMVS segment defined to RACF (or whichever ESM your shop uses). The OMVS segment specifies, among other things, your OMVS home directory.

通过sftp在PC和z/OS之间传输文件可能涉及代码页转换.这可能很棘手.

Transferring files between your PC and z/OS via sftp may involve code page translation. This can be tricky.

大型机数据通常在单个记录中同时包含文本和二进制数据,例如名称,货币金额和数量:

It is common for mainframe data to include both text and binary data in a single record, for example a name, a currency amount, and a quantity:

Hopper Grace ar% .

...应该是...

...which would be...

x'C8969797859940404040C799818385404040404081996C004B'

...以十六进制表示.这是代码页37,通常称为EBCDIC.

...in hex. This is code page 37, commonly referred to as EBCDIC.

在不知道姓氏仅限于前10个字节的情况下,给定名称将其后限制在10个字节之内,货币金额在接下来的3个字节中使用十进制压缩格式(也称为二进制编码的十进制),并且在接下来的两个字节中添加数量,您将无法准确地传输数据,因为代码页转换会破坏货币金额.转换为通常在Microsoft Windows上使用的代码页1250,您最终会得到...

Without knowing that the family name is confined to the first 10 bytes, the given name confined the the subsequent 10 bytes, the currency amount is in packed decimal (also known as binary coded decimal) in the next 3 bytes, and the quantity in the next two bytes, you cannot accurately transfer the data because code page conversion will destroy the currency amount. Converting to code page 1250, commonly in use on Microsoft Windows, you would end up with...

x'486F707065722020202047726163652020202020617225002E'

...翻译文本数据但打包数据被销毁的地方.打包的数据在最后半个字节(最后一个字节的下半部分)中不再具有有效符号,货币量本身也已更改,数量也已更改(从十进制75到十进制11,776,这是由于代码页转换和大尾数作为小尾数).

...where the text data is translated but the packed data is destroyed. The packed data no longer has a valid sign in the last nibble (the lower half of the last byte), the currency amount itself has been changed as has the quantity (from decimal 75 to decimal 11,776 due to both code page conversion and mangling of a big endian number as a little endian number).

一种解决方案是仅传输文本格式的数据.大型机排序实用程序通常擅长数据转换.如果您的文件包含打包数据或二进制数据,这确实需要在z/OS方面采取额外的步骤.

One solution is to only transfer data that is in text format. Mainframe sort utilities typically excel at data transformations. This does entail an extra step on the z/OS side if your file contains packed or binary data.

如果要将数据从z/OS传输到另一个平台进行处理,另一种解决方案是使用 JRecord 用于处理数据的库.

Another solution, if you are transferring data from z/OS to another platform for processing, is to use the JRecord library to process the data.

您希望访问的数据是否受到隐私法规的保护?您可能必须提供一些证据,说明已经采取了何种保护措施,以确保一旦将数据转移到目标位置后,只有授权人员才能访问其当前位置的数据.此类担保可能必须使审计师满意.

Is the data you wish to access covered by privacy legislation? You may have to provide some evidence that whatever protections are in place to guarantee that only authorized personnel have access to this data in its current location are also in place once you have transferred it to its target destination. Such guarantees may have to satisfy an auditor.

可以使用Unix cp命令在OMVS文件系统之间来回传输数据. 在z/OS上,此命令具有扩展名,使它既可以理解经典" z/OS数据集又可以理解OMVS文件.

Transferring data to and from the OMVS file system can be done with the Unix cp command. On z/OS this command has extensions to let it understand both "classic" z/OS datasets and OMVS files.

cp命令可以从shell提示符下执行,也可以通过执行BPXBATCH的标准z/OS批处理作业(JCL)执行,以适合您的工作流程为准.

The cp command can be executed either from a shell prompt or via a standard z/OS batch job (JCL) executing BPXBATCH, whichever fits into your workflow.

将文件复制到您有权访问的OMVS文件系统中的目录后,只需像通常将文件传输到PC一样使用sftp.

Once the file has been copied to a directory in the OMVS file system to which you have access, just use sftp like you normally would to transfer the file to your PC.

当我想通过PC与大型机主机之间交换数据时 sftp,什么是实现此目的的必要步骤.

When I want to exchange data between a PC and the Mainframe host via sftp, what are necessary steps to realise this.

初始设置...

  1. 使用OMVS段获取大型机凭据.
  2. 获取用于放置OMVS文件的目录.此目录必须对文件的内容具有适当的安全性.
  3. (可选)让大型机人员创建工作步骤,以将任何打包和二进制数据转换为文本格式.

每次您希望传输文件...

Each time you wish to transfer the file...

  1. (可选)执行上面#3中创建的转换步骤.
  2. 将文件复制到上面#2中设置的目录中.
  3. 使用您喜欢的sftp客户端将文件传输到PC.

如果这是您要定期执行的操作,则步骤1和2可能是计划的批处理作业的一部分,因此,如果需要,该文件始终存在于目录中.这需要与您的生产控制人员进行协商.

If this is something you're going to do on a regular basis, steps 1 and 2 could be part of a scheduled batch job so the file is always present in the directory when you want it. This something to negotiate with your production control staff.

这篇关于sftp到主机主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆