Portal | Manuals | 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 -> SYNCSORT
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:04 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

New User


Joined: 15 Aug 2015
Posts: 59
Location: Germany

PostPosted: Wed Nov 20, 2019 3:51 pm    Post subject:
Reply with quote

Couldn't you decide which SORT product you are using or why do you post the same question for DFSORT and SYNCSORT? icon_evil.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2255
Location: Hampshire, UK

PostPosted: Wed Nov 20, 2019 4:31 pm    Post subject: Reply to: Substring for 2 files in Sort JCL
Reply with quote

How is it not working? JCL error, program error, wrong data returned, something else?
Back to top
View user's profile Send private message
Shubhendu Chakraborty

New User


Joined: 20 Nov 2019
Posts: 3
Location: US

PostPosted: Wed Nov 20, 2019 6:05 pm    Post subject: Reply to: Substring for 2 files in Sort JCL
Reply with quote

It's giving me error at:

INCLUDE COND=(12,19,SS,EQ,2,9,CH)
*

INCLUDE/OMIT FORMATS INCOMPATIBLE
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 632
Location: Maryland

PostPosted: Wed Nov 20, 2019 6:56 pm    Post subject: Re: Reply to: Substring for 2 files in Sort JCL
Reply with quote

Shubhendu Chakraborty wrote:
It's giving me error at:

INCLUDE COND=(12,19,SS,EQ,2,9,CH)
*

INCLUDE/OMIT FORMATS INCOMPATIBLE

1) Do you speak English?
2) If yes, RTFM please. (And then copy here: what exactly have you read?)
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2255
Location: Hampshire, UK

PostPosted: Wed Nov 20, 2019 9:38 pm    Post subject: Reply to: Substring for 2 files in Sort JCL
Reply with quote

Please post your code using the code tags. As you posted it is saying INCLUDE is in error whereas I can see that it is the 2 after the EQ that is in error.
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Substring for 2 files in Sort JCL Shubhendu Chakraborty DFSORT/ICETOOL 1 Wed Nov 20, 2019 11:07 am
No new posts Sort to construct single record from ... Deepti_R SYNCSORT 3 Wed Nov 13, 2019 12:14 am
No new posts Capture DSN names through SORT / IDCAMS reach2abhinavtyagi DFSORT/ICETOOL 8 Tue Nov 05, 2019 7:33 pm
No new posts Convert mainframe data to .csv format... karan_reddy DFSORT/ICETOOL 10 Sat Nov 02, 2019 2:09 am
No new posts adrdssu tool to dump a files from a PDS Kannan Ramalingam JCL & VSAM 5 Fri Nov 01, 2019 6:25 pm

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