Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
594 views
in Technique[技术] by (71.8m points)

sorting - IBM Sort - Printing a record counter in a Detail Register

I've this file:

SORTIN01 DD *
AAAAAAAA
BBBBBBBB
CCCCCCCC
DDDDDDDD
EEEEEEEE

I'd like use sort to produce a SORTOUT file like this:

SORTOUT DD *
AAAAAAAA00000000010000000005
BBBBBBBB00000000020000000005
CCCCCCCC00000000030000000005
DDDDDDDD00000000040000000005
EEEEEEEE00000000050000000005

The first 08 bytes are the content of the input file, the next 10 bytes are a sequential number starting in 1 and incremented from 1 by 1, and the last 10 bytes are the total count of the registers in a file. I know how to count the total of the registers using sort in a trailer of a file, but I don't know how to count the total count registers in a detail register.

I appreciate if anyone knows how to help me.

Thanks.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...