View previous topic :: View next topic
|
Author |
Message |
paresh.ojha
New User
Joined: 21 Sep 2006 Posts: 17
|
|
|
|
HI,
I have a requirement of this kind.
1. In an i/p file one ercord haveing 'P' in a field have SPACES in another field.
2. on another record having 'I' corresponding to 'P' has a value corresponding to SPACES in 'P' type record.
3. I would like to populate the value in I record to the P record.
4. The P record always comes before the I record
Example
i/p
Code: |
99999001 23456 P 345D543 SPACES
99999002 76452 I 5673451 873456743
|
my o/p should be like this
Code: |
99999001 23456 P 345D543 873456743
99999002 76452 I 5673451 873456743
|
|
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Is there any key field in the record?
Bcoz the record shows the diffrent data of the both record.
pls give some more record in the example.
Thank you
shankar |
|
Back to top |
|
|
paresh.ojha
New User
Joined: 21 Sep 2006 Posts: 17
|
|
|
|
No idea about the key. the base line is to replicate a value in a field from one record to same field in a prior record. Can there be a sord card for this task? Plesae help me in this. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
What is the lrecl, recfm and blksize? |
|
Back to top |
|
|
paresh.ojha
New User
Joined: 21 Sep 2006 Posts: 17
|
|
|
|
LRECL = 315, RECFM = FB, BLKSIZE=31500 |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
LRECL = 315, RECFM = FB, BLKSIZE=31500 |
Alarm bell - this is an inefficient blocksize.
For 3390 the blocksize should be 27720, which will write two blocks each containing 88 records per track, where 31500 will write only one block containing 100 records per track.
It is far better to not specify a blocksize when creating datasets, let the operating system do it for you. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I was just thinking that if the records always came in pairs and the records per block was an even number, sort reformat on inrec copy would be easy by declaring the lrecl as twice the original, 630..... |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
paresh.ojha,
Your requirement is not clear.
Do you only have P and I records or do you have other types of records? If you have other types of records, can they appear between a P and I record pair, e.g.
P record
X record
I record
Is every P record followed by an I record or can you have a P record without an I record following it?
Is every I record preceded by a P record or can you have an I record without a P record preceding it?
What is the starting position and length of the field that contains the spaces in the P record (and the value in the I record)?
Please show a better example of the records in your input file (with more P and I records and other types of records if there are any) and the expected output records. |
|
Back to top |
|
|
|