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

Need the sort card using Build option.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Dec 12, 2012 8:15 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Dec 13, 2012 1:31 am
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
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: 792
Location: Pennsylvania

PostPosted: Thu Dec 13, 2012 1:52 am
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Dec 17, 2012 5:47 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts SCOPE PENDING option -check data DB2 2
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top