在大型机数据集中的特定列插入数据
Insert data at specific column in mainframe dataset
我需要从特定列开始将数据从大型机数据集 (A) 插入到不同的数据集 (B)。
例如第一个数据集 'A' 有以下数据
Command ===>
*****************************
1205271
1205251
6483068
1205257
第二个数据集 'B' 具有以下数据
----+----7----+----8----+----9----+----0----+----1----+----2----+----
********************************* Top of Data ***********************
EMPLOYER FFFF MMMMMMMM TTTT D
EMPLOYER SSSS TTTT D
FEDERAL UUUUUUUUUUU XXX TTTT D
MI STATE UUUUUUUUUUU TTTT D
NN STATE UUUUUUUUUUU TTTT D
最终数据集 B 应如下所示,即数据集 'A' 数据已插入到 'B' 中,从“105”列开始。
----+----7----+----8----+----9----+----0----+----1----+----2----+----
********************************* Top of Data ***********************
EMPLOYER FFFF MMMMMMMM TTTT D 1205271
EMPLOYER SSSS TTTT D 1205271
FEDERAL UUUUUUUUUUU XXX TTTT D 6483068
MI STATE UUUUUUUUUUU TTTT D 1205257
NN STATE UUUUUUUUUUU TTTT D
请告诉我您的建议。
谢谢
阿希什
假设您要包含数据的文件中的 LRECL 已经足够长:
Edit your target file
On the command-line `COPY your-source-file`
In the line-command area, put `a ` in the asterisks before for first line of your file
ENTER
Take note of how many lines were copied (look at the line-numbers and calculate if necessary)
Type BNDS in a line-command area
ENTER
Scroll right (usually PF11) to see that your BNDS is not before the end of the final data position that you want
Type the "destructive shift right" edit symbol `)` in block-mode `))` on the first line of your inserted data
Do the same with the last line of your inserted data
After one of the `))` type 104, the number of columns you want to shift column one by (final position, less one)
ENTER
Use the "move line-command symbol" `m` in block mode `mm` and mark the first and last line of the newly inserted data
Use the "overlay line-command symbol" `o` followed by the previously-noted number of lines copied and mark the original first line of your file
ENTER
Job done
请记住,只要您启用了恢复,就可以在保存文件之前撤消对文件的更改(还请记住,END 会自动保存文件)。
Command ===> copy temp Scroll ===> CSR
a***** ***************************** Top of Data ******************************
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
=BNDS> < >
000100 EMPLOYER FFFF MMMMMMMM TTTT D
000200 EMPLOYER SSSS TTTT D
000300 FEDERAL UUUUUUUUUUU XXX TTTT D
000400 MI STATE UUUUUUUUUUU TTTT D
000500 NN STATE UUUUUUUUUUU TTTT D
****** **************************** Bottom of Data ****************************
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
)) 010 1205271
000020 1205251
000030 6483068
))39 0 1205257
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
=BNDS> < >
000100 EMPLOYER FFFF MMMMMMMM TTTT D
000200 EMPLOYER SSSS TTTT D
000300 FEDERAL UUUUUUUUUUU XXX TTTT D
000400 MI STATE UUUUUUUUUUU TTTT D
000500 NN STATE UUUUUUUUUUU TTTT D
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 1205271
000002 1205251
000003 6483068
000004 1205257
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
=BNDS> < >
000100 EMPLOYER FFFF MMMMMMMM TTTT D
000200 EMPLOYER SSSS TTTT D
000300 FEDERAL UUUUUUUUUUU XXX TTTT D
000400 MI STATE UUUUUUUUUUU TTTT D
000500 NN STATE UUUUUUUUUUU TTTT D
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
mm 001 1205271
000002 1205251
000003 6483068
mm 004 1205257
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
=BNDS> < >
o4 100 EMPLOYER FFFF MMMMMMMM TTTT D
000200 EMPLOYER SSSS TTTT D
000300 FEDERAL UUUUUUUUUUU XXX TTTT D
000400 MI STATE UUUUUUUUUUU TTTT D
000500 NN STATE UUUUUUUUUUU TTTT D
然后它看起来像这样(我为我想要的列使用了一个示例值,40):
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
=BNDS> < >
000100 EMPLOYER FFFF MMMMMMMM TTTT D 1205271
000200 EMPLOYER SSSS TTTT D 1205251
000300 FEDERAL UUUUUUUUUUU XXX TTTT D 6483068
000400 MI STATE UUUUUUUUUUU TTTT D 1205257
000500 NN STATE UUUUUUUUUUU TTTT D
我需要从特定列开始将数据从大型机数据集 (A) 插入到不同的数据集 (B)。 例如第一个数据集 'A' 有以下数据
Command ===>
*****************************
1205271
1205251
6483068
1205257
第二个数据集 'B' 具有以下数据
----+----7----+----8----+----9----+----0----+----1----+----2----+----
********************************* Top of Data ***********************
EMPLOYER FFFF MMMMMMMM TTTT D
EMPLOYER SSSS TTTT D
FEDERAL UUUUUUUUUUU XXX TTTT D
MI STATE UUUUUUUUUUU TTTT D
NN STATE UUUUUUUUUUU TTTT D
最终数据集 B 应如下所示,即数据集 'A' 数据已插入到 'B' 中,从“105”列开始。
----+----7----+----8----+----9----+----0----+----1----+----2----+----
********************************* Top of Data ***********************
EMPLOYER FFFF MMMMMMMM TTTT D 1205271
EMPLOYER SSSS TTTT D 1205271
FEDERAL UUUUUUUUUUU XXX TTTT D 6483068
MI STATE UUUUUUUUUUU TTTT D 1205257
NN STATE UUUUUUUUUUU TTTT D
请告诉我您的建议。 谢谢 阿希什
假设您要包含数据的文件中的 LRECL 已经足够长:
Edit your target file
On the command-line `COPY your-source-file`
In the line-command area, put `a ` in the asterisks before for first line of your file
ENTER
Take note of how many lines were copied (look at the line-numbers and calculate if necessary)
Type BNDS in a line-command area
ENTER
Scroll right (usually PF11) to see that your BNDS is not before the end of the final data position that you want
Type the "destructive shift right" edit symbol `)` in block-mode `))` on the first line of your inserted data
Do the same with the last line of your inserted data
After one of the `))` type 104, the number of columns you want to shift column one by (final position, less one)
ENTER
Use the "move line-command symbol" `m` in block mode `mm` and mark the first and last line of the newly inserted data
Use the "overlay line-command symbol" `o` followed by the previously-noted number of lines copied and mark the original first line of your file
ENTER
Job done
请记住,只要您启用了恢复,就可以在保存文件之前撤消对文件的更改(还请记住,END 会自动保存文件)。
Command ===> copy temp Scroll ===> CSR
a***** ***************************** Top of Data ******************************
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
=BNDS> < >
000100 EMPLOYER FFFF MMMMMMMM TTTT D
000200 EMPLOYER SSSS TTTT D
000300 FEDERAL UUUUUUUUUUU XXX TTTT D
000400 MI STATE UUUUUUUUUUU TTTT D
000500 NN STATE UUUUUUUUUUU TTTT D
****** **************************** Bottom of Data ****************************
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
)) 010 1205271
000020 1205251
000030 6483068
))39 0 1205257
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
=BNDS> < >
000100 EMPLOYER FFFF MMMMMMMM TTTT D
000200 EMPLOYER SSSS TTTT D
000300 FEDERAL UUUUUUUUUUU XXX TTTT D
000400 MI STATE UUUUUUUUUUU TTTT D
000500 NN STATE UUUUUUUUUUU TTTT D
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 1205271
000002 1205251
000003 6483068
000004 1205257
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
=BNDS> < >
000100 EMPLOYER FFFF MMMMMMMM TTTT D
000200 EMPLOYER SSSS TTTT D
000300 FEDERAL UUUUUUUUUUU XXX TTTT D
000400 MI STATE UUUUUUUUUUU TTTT D
000500 NN STATE UUUUUUUUUUU TTTT D
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
mm 001 1205271
000002 1205251
000003 6483068
mm 004 1205257
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
=BNDS> < >
o4 100 EMPLOYER FFFF MMMMMMMM TTTT D
000200 EMPLOYER SSSS TTTT D
000300 FEDERAL UUUUUUUUUUU XXX TTTT D
000400 MI STATE UUUUUUUUUUU TTTT D
000500 NN STATE UUUUUUUUUUU TTTT D
然后它看起来像这样(我为我想要的列使用了一个示例值,40):
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
=BNDS> < >
000100 EMPLOYER FFFF MMMMMMMM TTTT D 1205271
000200 EMPLOYER SSSS TTTT D 1205251
000300 FEDERAL UUUUUUUUUUU XXX TTTT D 6483068
000400 MI STATE UUUUUUUUUUU TTTT D 1205257
000500 NN STATE UUUUUUUUUUU TTTT D