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

JCL for comparison of flat files of variable length


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kayelan
Warnings : 1

New User


Joined: 01 Dec 2006
Posts: 13
Location: frankfurt

PostPosted: Fri Dec 01, 2006 8:15 pm
Reply with quote

Hi everyone,

I hv 2 flat files of variable length and records > than 20000. Let me explain the file structure:
<Fixed part>+ <n* Variable parts>
Every record has a fixed part with n number of Variable parts extended after the fixed part.
Record Layout For example..
FIXED PART-----------| VAR PART 1 | VAR PART 2 | VAR PART 3 |:::::::::

Requirements:

1. Need to compare two files

2. No. of records in both the files differ
For ex., File-1 will have 20 records and File-2 will have 30 records. The utility has to pick up only the same records and neglect the rest.

3. There are certain exceptional fields in the file which are to be omitted for comparison. i.e., even if the specified field differs in both the files, it is assumed the records match exactly .

4. There is a key field in one of the variable part that acts as a starting point to map a record in one file to other file


Need a JCL to do all the steps mentioned above.

Kindly help
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Fri Dec 01, 2006 11:55 pm
Reply with quote

Quote:
FIXED PART-----------| VAR PART 1 | VAR PART 2 | VAR PART 3 |:::::::::


How can the compare software determine the length of each variable part and its number?

Can you show records with fake data.
Back to top
View user's profile Send private message
kayelan
Warnings : 1

New User


Joined: 01 Dec 2006
Posts: 13
Location: frankfurt

PostPosted: Mon Dec 04, 2006 1:33 pm
Reply with quote

Record structure looks like following:

Fixed part - 20 bytes
Variable part-5 bytes
In Fixed part the last field will contain no. of Variable parts following it.

Ex:
abcdefghijklmnopqr0501aaa02bbb03ccc04ddd05eee

05 in red colour shows no. of Variable parts.
Green and Blus show the variable parts
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Mon Dec 04, 2006 3:54 pm
Reply with quote

One more question : does any occurence of variable part is always fixed. I mean all VAR PART n have the same length.

The variable part of record is only conditionned by field with "05" in this case, but which can be "03", "07", etc ...
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
Search our Forums:

Back to Top