直接连接:从大型机向Unix发送文件 [英] Connect Direct : File sending from Mainframe to Unix

查看:144
本文介绍了直接连接:从大型机向Unix发送文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从大型机直接连接到UNIX"框发送可变长度文件时,UNIX上的文件在大型机"文件的开头有一些额外的字节,我尝试使用其他SYSOPTS选项,但仍得到这些初始字节.有任何想法吗?

When I am sending a Variable length file from Mainframe Connect direct to UNIX box, the file on UNIX have some extra bytes on the beginning of the Mainframe file, I tried using different SYSOPTS option but I am still getting those intial bytes. Any Idea ?

推荐答案

在执行以下操作之前,应先查看如何将文件复制到大型机上的固定长度记录(recfm = FB)文件中.转移.有许多大型机实用程序可以做到这一点(即排序).

You should look at getting the file copied to a Fixed-Length record (recfm=FB) file on the mainframe before doing the transfer. There are a number of mainframe utilities that can do this (i.e. sort).

如果将其作为VB文件传输,则还应将其保留为EBCDIC文件(BDW/RDW字段是二进制字段,不应转换为ASCII).

If you transfer it as a VB file you should also leave it as an EBCDIC file (the BDW/RDW fields are binary fields and should not be translated to ASCII).

正如其他人所说,举一个文件的例子会很有用.

As others have said, it would be useful to have an example of the file.

接着是NealB.大型机上的vb文件以这种格式存储

Following on from NealB. A vb file on the mainframe is stored in this format

<BDW><RDW>Record Data 1
     <RDW>Record Data 2
      ....
     <RDW>Record Data n-1
<BDW><RDW>Record Data n
     <RDW>Record Data n+1
      ....
     <RDW>Record Data o-1
<BDW><RDW>Record Data o
     <RDW>Record Data o+1
      ....

哪里

  • BDW:块描述符字为4个字节;前2个字节是块长度(大端格式);磁盘文件的最后2个字节为十六进制0(磁带文件可以使用这2个字节).
  • RDW:记录描述符字为4个字节;前2个字节是记录长度(大端格式);最后2个字节为十六进制0.
  • BDW : Block descriptor word is 4 bytes; the first 2 bytes are the block length (big endian format); the last 2 bytes will be hex 0's for disk files (tapes files can use these 2 bytes).
  • RDW : Record Descriptor word is 4 bytes; the first 2 bytes are the record length (big endian format); the last 2 bytes will be hex 0's.

因此,如果块长度为240(并包含3个80字节记录),则文件为

So if Block length was 240 (and contained 3 80-byte records) then the file would be

---BDW--- ---RDW---
00F0 0000 0050 0000 80-bytes of data (record 1)
          0050 0000 80-bytes of data (record 2)
          0050 0000 80-bytes of data (record 3)

可能有一个用于处理大型机VB文件的Unix实用程序

There may be a unix utility for handling mainframe VB files

Connect-Direct(NDM)有一些vb选项(请参阅

There are are some vb options for Connect-Direct (NDM) (see http://pic.dhe.ibm.com/infocenter/sb2bi/v5r2/index.jsp?topic=%2Fcom.ibm.help.cd_interop_sysopts.doc%2FCDP_UNIXSysopts.html).

查看文档,您无法将vb选项与ascii翻译结合使用;将文件转换为大型机上的固定长度记录(recfm = FB)可能很有意义.

Looking at the documentation, you can not combine vb options with ascii translation; converting the file to Fixed-Length records (recfm=FB) on the mainframe may make a lot of sense.

注意:您可以尝试使用记录编辑器,然后使用File-Wizard(布局名称左侧的按钮).该向导将确认它是Mainframe-VB文件.

Note: You could try looking at the file with the Record Editor and using the File-Wizard (button to the left of the layout name). The wizard should pickup that it is a Mainframe-VB file.

注意:虽然将文件转换为大型机上的固定长度记录是最佳选择,但Java项目

Note: While converting the file to a fixed-length record on the mainframe would be the best option, the java project JRecord can read Mainframe VB files if need be

这篇关于直接连接:从大型机向Unix发送文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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