Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Substring for 2 files in Sort JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Substring for 2 files in Sort JCL
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

Active User


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

PostPosted: Wed Nov 20, 2019 12:10 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Undesired result while joining files. Khupe SYNCSORT 3 Tue Sep 22, 2020 8:05 pm
This topic is locked: you cannot edit posts or make replies. Parsing more than 1000 columns in a s... ssuthagar SYNCSORT 10 Tue Sep 22, 2020 12:23 am
No new posts Dynamically read input files using BP... Srinivas B COBOL Programming 20 Sat Sep 05, 2020 1:48 pm
No new posts Sync logic between VSAM files and DB2... murali.andaluri COBOL Programming 9 Tue Aug 25, 2020 1:01 pm
This topic is locked: you cannot edit posts or make replies. SORT the records based on the second ... Ramsee SYNCSORT 1 Wed Aug 19, 2020 3:01 pm

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