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
 

 

JCL for comparison of flat files of variable length

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: JCL for comparison of flat files of variable length
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: 456
Location: Belgium

PostPosted: Fri Dec 01, 2006 11:55 pm    Post subject:
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    Post subject:
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: 456
Location: Belgium

PostPosted: Mon Dec 04, 2006 3:54 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm


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