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

Substring for 2 files in Sort JCL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Shubhendu Chakraborty

New User


Joined: 20 Nov 2019
Posts: 3
Location: US

PostPosted: Wed Nov 20, 2019 11:07 am
Reply with quote

Hi,

I have 1 file of 10 bytes, first byte is Key and rest 9 have some value
Ex.

A111111111
B222222222
C333333333

My second file is of 20 bytes, first byte as Key and rest is random value
Ex.

AQWQW111111111ASWQQQ
B222222222QWQEFDFDFRER
CSDFGDFDG333333333FGGG
CFDSFDSFFDSFFSDDSFDSSF
BDFSFDSFFSDFEWREWREEW

My expected result to include records from file 2 which has matching value from file 1 position 2 to 9 bytes with sub string of file 2:

AQWQW111111111ASWQQQ
B222222222QWQEFDFDFRER
CSDFGDFDG333333333FGGG

I tried below but its not working:

JOINKEYS FILES=F1,FIELDS=(1,1,A)
JOINKEYS FILES=F2,FIELDS=(1,1,A)
REFORMAT FIELDS=(F1:1,10,F2:1,20)
SORT FIELDS=(1,10,CH,A)
INCLUDE COND=(12,19,SS,EQ,2,9,CH)
OUTREC=(1:11,20)

Please guide me with the same.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1222
Location: Bamberg, Germany

PostPosted: Wed Nov 20, 2019 12:10 pm
Reply with quote

What does the Joblog tell you? RECFM?
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top