JCL Syncsort Match and Flag in 1 of 2 files



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

JCL Syncsort Match and Flag in 1 of 2 files

Postby tslmsumm » Wed Jul 18, 2018 10:14 pm

I have 2 data sets. Data set A & data setB. If the key from data set A is found in data set B, I want to set an indicator on the end of data set A.

data set A (LRECL):
12345AAA
12445DDD
32445BBB
67888CCC


data set B:
12345
67888


If the 1st 5 positions from data set A are in data set B then I want to add an indicator to the end of the record in data set A, like so:
data set A:
12345AAAY
12445DDD
32445BBB
67888CCCY
 

I've looked at several examples and methods but it is still not working properly.
//STEP40   EXEC SORTD,CYLS=1000                                
//SYSOUT   DD SYSOUT=*                                        
//SORTJNF1 DD DSN=data set A,                          
//             DISP=(OLD,CATLG,KEEP)                          
//SORTJNF2 DD DSN=data set B,                          
//             DISP=(OLD,CATLG,KEEP)                          
//OUTFILE  DD DSN=data set C,                          
//             DISP=(NEW,CATLG,KEEP),                          
//             DCB=(DSORG=PS,RECFM=FB,LRECL=9,BLKSIZE=0),    
//             SPACE=(CYL,(1000,1000),RLSE),                  
//             UNIT=DISK                                      
//SYSIN    DD *                                                
     JOINKEYS FILES=F1,FIELDS=(1,5,A),SORTED,NOSEQCK        
     JOINKEYS FILES=F2,FIELDS=(1,5,A),SORTED,NOSEQCK          
     JOIN UNPAIRED,F1                                          
     REFORMAT FIELDS=(F1:1,9,?)                              
     OPTION COPY                                              
     OUTFILE IFTHEN=(WHEN=(9,1,CH,EQ,C'B'),OVERLAY=(9:C'Y'))
/*                              


Do I have to send my output to data set C or can I just append to end of data set A?
When I originally create data set A in STEP20, do I need to add a position on to the end? Do I need to make it 9?

If anyone can help, I would greatly appreciate it.
Thx in advance.
tslmsumm
 
Posts: 4
Joined: Wed Jul 18, 2018 7:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JCL Syncsort Match and Flag in 1 of 2 files

 

Re: JCL Syncsort Match and Flag in 1 of 2 files

Postby NicC » Thu Jul 19, 2018 2:11 pm

This is not a JCL question but a Syncsort question. Topic move to Syncsort part of the forum. Slight editing done. tslmsumm, please carefully note the changes that were made.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2811
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 116 times

Re: JCL Syncsort Match and Flag in 1 of 2 files

Postby tslmsumm » Mon Jul 23, 2018 11:57 pm

Thanks. How long does it typically take to get a response on this forum?
tslmsumm
 
Posts: 4
Joined: Wed Jul 18, 2018 7:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JCL Syncsort Match and Flag in 1 of 2 files

Postby prino » Tue Jul 24, 2018 12:11 am

tslmsumm wrote:Thanks. How long does it typically take to get a response on this forum?

Given this extremely arrogant question, I'd say:

"For you: Never!"

and I hope the other people who give their time freely on this forum will have the same attitude!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 562
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 24 times

Re: JCL Syncsort Match and Flag in 1 of 2 files

Postby Robert Sample » Tue Jul 24, 2018 12:38 am

How long does it typically take to get a response on this forum?
This is a volunteer forum -- as in, responses are posted when people have the time and interest and knowledge to respond. Typical responses can range from minutes to hours to days to weeks to years -- and any of these time frames will be normal. Prompting for responses as you did, however, tends to slow down responses since those people who would have responded decide it's not worth the hassle of responding.
Robert Sample
Global moderator
 
Posts: 3524
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 251 times

Re: JCL Syncsort Match and Flag in 1 of 2 files

Postby steve-myers » Tue Jul 24, 2018 1:41 am

tslmsumm wrote:Thanks. How long does it typically take to get a response on this forum?
It varies. I looked at the logged time for your initial request and the logged time for the response: it came to not quite 16 hours. It then took you several days to make an extremely rude response to the post!

Personally I regard your request to be in the nature of do my work for me, rather than a request for assistance.

Now I am not qualified to either assist you or to do your work for you; I rarely use sort products for anything. I think it's been 10 years since I used a sort product.

If you want people to do your work for you then you had better be prepared to pay the going rate for consulting, because that's what it will take. Good luck.
steve-myers
Global moderator
 
Posts: 1944
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 209 times

Re: JCL Syncsort Match and Flag in 1 of 2 files

Postby tslmsumm » Tue Jul 24, 2018 11:03 pm

I'm sorry, did not mean to offend anyone. Just frustrated... all I am looking for is someone who might know what I'm doing wrong... I don't want anyone to do any of my work for me. Just looking for help. I honestly have never posted on a site like this before and wasn't sure what to expect. I found other people posting things and asking similar questions, so I didn't think it was too much to ask. I'll keep trying somewhere else.
tslmsumm
 
Posts: 4
Joined: Wed Jul 18, 2018 7:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JCL Syncsort Match and Flag in 1 of 2 files

Postby Robert Sample » Tue Jul 24, 2018 11:48 pm

Do I have to send my output to data set C or can I just append to end of data set A?
Modifying your input data set is not generally recommended in case of reruns.
When I originally create data set A in STEP20, do I need to add a position on to the end? Do I need to make it 9?
All you provided us is STEP40 -- what happens in STEP20? We really cannot comment upon unseen code.

So you provided partial information, expected us to figure out what you did not provide, and then got impatient when nobody responds within a few days? Perhaps you should Google how to ask good questions (there are about 994,000,000 results for that, by the way). Fairly often, a lack of responses indicates that the question posed was not well-thought-out or was incomplete and hence the person posting should review what was posted. Oh, and I just checked -- there are over 500 posts that have NEVER had an answer (some going back to 2007), so it cannot considered unusual for a post to never be answered.
Robert Sample
Global moderator
 
Posts: 3524
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 251 times

Re: JCL Syncsort Match and Flag in 1 of 2 files

Postby tslmsumm » Wed Jul 25, 2018 12:44 am

The only thing that happened in previous steps were the creation of Dataset A and B, which I outlined. I don't think asking if I needed to account for the additional space that I'm adding in STEP40 in STEP20 is an incomplete question. Thank you for your time and response.

Since you were so helpful to me, I'm going to return the favor: here are some Google searches that may benefit you:
"How to answer a question" - 1.1 billion results
"How to accept an apology" - 34.3 million results
"How to forgive and forget" - 74.2 million results
"How to read between the lines" - 635 million results
tslmsumm
 
Posts: 4
Joined: Wed Jul 18, 2018 7:21 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post