Page 1 of 1

Need a matching logic in using jcl

PostPosted: Mon Jul 09, 2018 5:17 pm
by Krupali_Patnala
Hi All,

Could you please help me out on the below issue. I need a matching logic between two files and write the matched record in the output file.

File 1: Record Length - 5270 --> VB file--> Position 59th (2bytes) --> Only the 59th pos in header as a single record
File 2 : Record Length - 80 --> FB File --> Position 1th (2 bytes) --> Has multiple records

I need to create the matching logic in such a way that from File1 pos59th data (single record) needs to be matched to the multiple records of the File2.

Sample Data:
File 1: .............................................................................................................AB(59th position)
File 2: ZX
YE
AB
BG
XX

Output :
AB
Need to match the AB (File 1 ) to the AB in File 2

Re: Need a matching logic in using jcl

PostPosted: Mon Jul 09, 2018 5:57 pm
by Robert Sample
You cannot do this "using jcl" -- you MUST use a program (such as sort). JCL sets up environments and executes programs -- and that is all it does. JCL cannot sort, JCL cannot merge, JCL cannot read data sets -- all JCL does is execute programs and set up environments.

Your requirement looks like a simple sort two-way merge. Since this is a HELP forum and not a WRITE-THE-CODE-FOR-YOU forum, you will need to post what you have tried so far and why the results you got do not match what you expect.