Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Populating a field from one record to another record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Populating a field from one record to another record
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    Post subject: Re: Populating a field from one record to another record
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    Post subject: Re: Populating a field from one record to another record
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: 3158
Location: Tucson AZ

PostPosted: Mon May 07, 2007 3:11 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon May 07, 2007 3:48 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Mon May 07, 2007 5:37 pm    Post subject:
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 Moderator


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

PostPosted: Mon May 07, 2007 8:50 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 2 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us