Need a matching logic in using jcl



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Need a matching logic in using jcl

Postby Krupali_Patnala » Mon Jul 09, 2018 5:17 pm

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
Krupali_Patnala
 
Posts: 1
Joined: Mon Jul 09, 2018 5:01 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need a matching logic in using jcl

Postby Robert Sample » Mon Jul 09, 2018 5:57 pm

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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post