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
 
Need the sort card using Build option.
Goto page Previous  1, 2
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Wed Dec 12, 2012 8:15 pm    Post subject: Reply to: Need the sort card using Build option.
Reply with quote

I was providing an OMIT that I thought you could then generate...

However...

As you do not know the P/G, except on FILE A, I don't think ANY single OMIT is going to do what you want (as you show in your data, that an incident number could be in either place on FILE B or C).

I think you would need to pass each of the two files twice, with different OMITs.

It is either that or "program time", or try to work out what Kolusu had in mind :-), bearing in mind also that there are things like JNFnCNTL files which DFSORT has and your SyncSort may not.
Back to top
View user's profile Send private message

Anbarasan D

New User


Joined: 20 Apr 2010
Posts: 21
Location: USA

PostPosted: Thu Dec 13, 2012 12:51 am    Post subject:
Reply with quote

You can try this.

Code:

//S1       EXEC PGM=SORT             
//SYSOUT   DD SYSOUT=*               
//SORTIN   DD *                     
0000000091 P B                       
0000000095 G B                       
0000000072 P C                       
0000000051 G C                       
//FILEB    DD DSN=&&FILEP,           
//            DISP=(,PASS,DELETE),   
//            UNIT=SYSDA,           
//            SPACE=(TRK,(10,5),RLSE)
//FILEC    DD DSN=&&FILEG,           
//            DISP=(,PASS,DELETE),   
//            UNIT=SYSDA,           
//            SPACE=(TRK,(10,5),RLSE)
//SYSIN    DD *                                 
  OPTION COPY                                   
  OUTFIL FNAMES=FILEB,INCLUDE=(12,1,CH,EQ,C'P'),
                    BUILD=(1,80)                 
  OUTFIL FNAMES=FILEC,INCLUDE=(12,1,CH,EQ,C'G'),
                    BUILD=(1,80)                 
/*                                               
//S2       EXEC PGM=SORT                         
//SYSOUT   DD SYSOUT=*                           
//SORTJNF1 DD DSN=&&FILEP,                       
//            DISP=SHR                           
//SORTJNF2 DD *                                 
123456789123456789AA00000000A1AAAAAAAAA0000000095
123456789123456789AA0000000021AAAAAAAAA0000000051
123456789123456789AA0000000091AAAAAAAAA0000000004
123456789123456789AA0000000072AAAAAAAAA0000000001
/*                                               
//SORTOUT DD SYSOUT=*                       
//SYSIN DD *                               
  JOINKEYS FILE=F1,FIELDS=(01,10,A),SORTED 
  JOINKEYS FILE=F2,FIELDS=(21,10,A),SORTED 
  JOIN UNPAIRED,F2                         
  REFORMAT FIELDS=(F2:1,80)                 
  SORT FIELDS=COPY                         
/*                                         
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Thu Dec 13, 2012 1:31 am    Post subject: Reply to: Need the sort card using Build option.
Reply with quote

Mmmm.... are you sure that that is going to satisfy the requirement?

How are you distinguishing between TS's FILEB and FILEC for your, er, one final output file?
Back to top
View user's profile Send private message
Anbarasan D

New User


Joined: 20 Apr 2010
Posts: 21
Location: USA

PostPosted: Thu Dec 13, 2012 1:45 am    Post subject:
Reply with quote

Sorry, I coded only for one output file(FILEB). Need to have the third step to get the output for FILEC(similar like S2 step)
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 726
Location: Pennsylvania

PostPosted: Thu Dec 13, 2012 1:52 am    Post subject:
Reply with quote

I think you also need the output from step S2 to be reprocessed a second time to ensure it doesn't match Type G with File B.

I see this is many sort steps before your done.

Or one small Rexx program.

I think we have lost the TS however. Maybe wait to see if they are still with us.
Back to top
View user's profile Send private message
mfchnuser

New User


Joined: 21 Sep 2012
Posts: 12
Location: India

PostPosted: Mon Dec 17, 2012 5:27 pm    Post subject: reply:
Reply with quote

Thanks for your replies..i ran the sort step suggested by Anbarasan
..getting an abend U0016

this is the sysout log
Code:

 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                               
 WER486A  ERROR IN JNF1 PROCESSING                                           
 WER482I  JNF1 STATISTICS                                                   
 WER483B  1,780K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,         
 WER483B     0 BYTES RESERVE REQUESTED, 1,288,960 BYTES USED                 
 WER108I  SORTJNF1 : RECFM=FB   ; LRECL=    80; BLKSIZE= 27920               
 WER073I  SORTJNF1 : DSNAME=SYS12352.T064932.RA000.F0091CVT.FILEP.H04       
 WER483B  748K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
 WER483B     0 BYTES RESERVE REQUESTED, 268K BYTES USED                     
 WER485A  SORTJNF1 OUT OF SEQUENCE, RECORD NUMBER = 2                       
 WER482I  JNF2 STATISTICS                                                   
 WER483B  1,780K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,         
 WER483B     0 BYTES RESERVE REQUESTED, 1,302,464 BYTES USED                 
 WER108I  SORTJNF2 : RECFM=FB   ; LRECL=    80; BLKSIZE=    80               
 WER073I  SORTJNF2 : DSNAME=Z1225DJ.F0091CVT.JOB25150.D0000103.?             
 WER483B  748K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
 WER483B     0 BYTES RESERVE REQUESTED, 268K BYTES USED                     
 WER416B  BSAM WAS USED FOR SORTJNF2       

Can you please help why this is coming.. used exactly same jcl to test
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Mon Dec 17, 2012 5:47 pm    Post subject: Reply to: Need the sort card using Build option.
Reply with quote

Code:
WER486A  ERROR IN JNF1 PROCESSING                                           
[...]
WER485A  SORTJNF1 OUT OF SEQUENCE, RECORD NUMBER = 2                       


Looks like your data is not in sequence. Remove the SORTED for the file 1 JOINKEYS.
Back to top
View user's profile Send private message
Anbarasan D

New User


Joined: 20 Apr 2010
Posts: 21
Location: USA

PostPosted: Tue Dec 18, 2012 1:39 am    Post subject:
Reply with quote

Use the Step2 sort card like below.

Code:
//SYSIN DD *                       
  JOINKEYS FILE=F1,FIELDS=(01,10,A)
  JOINKEYS FILE=F2,FIELDS=(21,10,A)
  JOIN UNPAIRED,F2,ONLY           
  REFORMAT FIELDS=(F2:1,80)       
  SORT FIELDS=COPY                 
/*                                 
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 -> JCL & VSAM All times are GMT + 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts need assistance on a sort rajiv rengasamy SYNCSORT 11 Fri Jul 26, 2019 8:19 pm
No new posts need help with a tricky sort - Continued rajiv rengasamy SYNCSORT 8 Tue Jul 16, 2019 1:26 pm
No new posts Sort records within a data block rajiv rengasamy DFSORT/ICETOOL 0 Fri Jul 12, 2019 3:25 pm
This topic is locked: you cannot edit posts or make replies. need help with a tricky sort. rajiv rengasamy SYNCSORT 7 Fri Jul 12, 2019 12:36 pm
No new posts refresh data from production - update... jzhardy DB2 1 Mon May 06, 2019 5:06 pm

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