Replace at regular intervals.
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Utilities

#1: Replace at regular intervals. Author: Martin PostPosted: Tue Jan 16, 2007 3:11 am
    —
Here's the input

abcd 789 789 789 789
abcd
abcd xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Output
abcd 789 789 789 789
abcd 789 789 789 789
abcd 789 789 789 789

#2:  Author: dbzTHEdinosauerLocation: germany PostPosted: Tue Jan 16, 2007 3:28 am
    —
what is:
  • input record length
  • output record length
  • key position/len


assuming you want:
  • key is relative location 0, length 4
  • first instance of a key, the data (relative location 4, len of record-len - 4) is overlayed on each consecutive record until key changes


are the records already sorted by the key?

Frank or someone else will come along and provide the answer, but reading thru previous post in this forum indicates that this kind of info is necessary to provide a solution.

#3:  Author: Frank YaegerLocation: San Jose PostPosted: Tue Jan 16, 2007 11:58 am
    —
Martin,

You haven't given enough information for anyone to help you. You need to explain in detail what you're trying to do. What are the "rules" for getting from input to output? What is the RECFM and LRECL of the input file? Show an example of the input and output records that illustrates the variations you can have.

#4:  Author: Martin PostPosted: Fri Jan 19, 2007 1:37 am
    —
Frank Yaeger,

Here's the exact requirements.

LRECL :- 1800
RECFM=FB
Rules: -

- There are 2 records for every employee and we need sum up all his sal and other details which come in at regular intervals ( Sal @ Pos 22 , contr @ 72 (Sal Pos + 50 .. So on till 1672).

#5:  Author: kolusuLocation: San Jose PostPosted: Fri Jan 19, 2007 9:15 am
    —
Martin,

You need to learn to spell out your requirement properly. Post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question.

The latest requirement does NOT match the output you described in the first post.

post a sample input and desired output along with the dcb properties.

Kolusu



MVSFORUMS.com -> Utilities


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group