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

File compare easytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Mon Apr 27, 2009 5:17 pm
Reply with quote

Hi,

I am trying to compare two files say, F1 and F2 and writing it to an output file say F3 based on a matching KEY field of 9 bytes. (using easytrieve plus)

F1 and F2 are VB files with LRECL = 8364 bytes and sorted based on key field.

F1 and F2 have record length of 3320 only though their LRECL is 8364 bytes.

Hence output record should also have record length of 3320 bytes with the file LRECL as 8364 bytes.

But actually records in output file is having largest length i.e 8364 bytes though input file is having record length of 3320 bytes.
i.e after 3320, low-values are populated.

This is creating problem in downstream as I need to have records of 3320 bytes only.

is there any way we can calculate length of each record before writing the output file?

Please let me know if my question is not very clear.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Apr 27, 2009 5:22 pm
Reply with quote

review Your understanding of the DCB attributes...

For VB datasets ( variable blocked ) the lrecl specified in the dcb has nothing(almost)
to do with the length of individual records
it is the longest length to expected,
if the program is well written You will get records of the right length even if
the dcb info specifies a bigger one
( always wise to do it )

not thread related
I wonder why on these forums there are so many VB datasets when
from the discussion comes out that the records are really fixed length icon_confused.gif
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Mon Apr 27, 2009 5:24 pm
Reply with quote

ok. thx
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Apr 27, 2009 5:36 pm
Reply with quote

Quote:
... after 3320, low-values are populated.


I had not seen the quote,
but as a general point in any decently written program / jcl two things
should be carried along...

the DCB info ( as I said before irrelevant as far as the single record content/layout)

as in this case the unaltered single record length/content/layout

if the record length gets changed to the maximum record length
and the unused area filled with low values

there is certainly a flaw in the application processing
or processing parameters
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Apr 27, 2009 5:37 pm
Reply with quote

Quote:
not thread related
I wonder why on these forums there are so many VB datasets when
from the discussion comes out that the records are really fixed length
My guess is the system designers think it provides flexibility by not tying the design to one fixed record length. Of course if nobody supporting the system understands the VB file, I'm not sure there's enough gained to make it worthwhile.
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Tue May 05, 2009 5:45 pm
Reply with quote

Hi Robert/enrico

I added below statements in the program and it is working fine.

Code:
FILEB:RECORD-LENGTH = FILEA:RECORD-LENGTH
         PUT FILEB FROM FILEA


FILEA -> Input file
FILEB -> Output file

Thanks
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top