IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Populating a field from one record to another record


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
paresh.ojha

New User


Joined: 21 Sep 2006
Posts: 17

PostPosted: Mon May 07, 2007 12:13 pm
Reply with quote

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
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Mon May 07, 2007 1:03 pm
Reply with quote

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
View user's profile Send private message
paresh.ojha

New User


Joined: 21 Sep 2006
Posts: 17

PostPosted: Mon May 07, 2007 1:15 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon May 07, 2007 3:11 pm
Reply with quote

What is the lrecl, recfm and blksize?
Back to top
View user's profile Send private message
paresh.ojha

New User


Joined: 21 Sep 2006
Posts: 17

PostPosted: Mon May 07, 2007 3:39 pm
Reply with quote

LRECL = 315, RECFM = FB, BLKSIZE=31500
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon May 07, 2007 3:48 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon May 07, 2007 5:37 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon May 07, 2007 8:50 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top