77家的会客2010

Tag: AS400 | 记录数: 27
AS400将PF转成CSV或XLS

 

很多人提到过N种方法 ,什么变成SPLF再打印成什么,或是直接BIFF8格式下载之类的;

SPLF什么的很麻烦就不说了,BIFF8有个问题是像大量数据的时候很不好用,并且容易出现乱码。

那么只用一个方法,就可以将PF的数据导下来,AS400有一个命令叫“CPYTOIMPF”,可以将PF文件复制到一个单字段的PF里,原来PF的各个字段会变成CSV格式的,

然后再把这个CSV PF下载下来,直接用ASCII模式,扩展名用TXT或CSV都行,因为他就是纯文本,

FTP传送码和CCSID的对应关系

 

TYPE (表示タイプの指定)

FTP サーバー・サブコマンド

ファイル転送を行うときのファイル転送のタイプまたは表示方法を指定するには、 次の形式の TYPE FTP サーバー・サブコマンドを使用します。

 


 TYPE   [ A
        |  B [ 1 | 2 | 3 [A|R] | 4 [A|R  ] | 5 | 6 | 7]
        |  C ccsid#
        |  E
        |  F [ 1 ]
        |  I ]
 

 

RPG中数组和DS使用方法总结

ARRAY
一 array与table的区别
        Array:可以使用下标,进行顺序访问或随即访问
        Table:不可以使用下标,只能顺序访问。只能以TABxxx开头。
        注:table虽然和array的功能相似,但是array要比table灵活很多。Table可以淘汰了,了解table的原因是维护老的代码时可能会用到。

二 array的类型和key word
        1有三种类型的array,分别是compile time array、run time array、pre-run time array。
        
        2与array相关的key word:
        DIM(number)         定义数组中元素的数量

RPGLE中REPLACE函数的用法

 

%REPLACE(replacement string: source string{:start position {:source
length to replace}})

%REPLACE returns the character string produced by inserting a replacement string into the source string, starting at the start position and replacing the specified number of characters.

The first and second parameter must be of type character, graphic, or UCS-2 and can be in either fixed- or variable-length format. The second parameter must be the same type as the first.

The third parameter represents the starting position, measured in characters, for the replacement string. If it is not specified, the starting position is at the beginning of the source string. The value may range from one to the current length of the source string plus one.

The fourth parameter represents the number of characters in the source string to be replaced. If zero is specified, then the replacement string is inserted before the specified starting position. If the parameter is not specified, the number of characters replaced is the same as the length of the replacement string. The value must be greater than or equal to zero, and less than or equal to the current length of the source string.

The starting position and length may be any numeric value or numeric expression with no decimal positions.

The returned value is varying length if the source string or replacement string are varying length, or if the start position or source length to replace are variables. Otherwise, the result is fixed length.

AS400安全相关命令

 

GRTOBJAUT

RVKOBJAUT

EDTOBJAUT

CRTAUTL

EDTAUTLE

WRKAUTL