Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us