Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Problem in Merge

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
mheatherton

New User


Joined: 26 Jul 2006
Posts: 4
Location: USA

PostPosted: Tue Apr 17, 2012 7:32 pm    Post subject: Problem in Merge
Reply with quote

Forgive me if this ends up being a duplicate post. My workplace is experiencing Server Problems and from what I see there, there is no evidence that this made it to the Forum to be posted. So I will use a different method of posting.

I have a MERGE that keeps returning a U0065 ABEND. The indication is that the file in SORTIN02 is coming in unsorted. Such is not the case. Knowing full well it is rare that the System is wrong and usually it is the Programmer. I assure you however that both SORTIN01 and SORTIN02 are sequenced using identical Control Statements with an ALTSEQ and Identical Keys.

Contained in the attachment lies the Code and the SYSOUT Log. Thoughts???

Code:


//**********************************************************************
//SORT85   EXEC  PGM=SORT,PARM='RC16=ABE'                               
//SYSOUT   DD    SYSOUT=*                                               
//SORTIN01 DD    DSN=AIDMP.PA2779KS.SRPM(0),DISP=SHR                   
//SORTIN02 DD    DSN=AIDMP.PA2779KS.FYTD(-1),DISP=SHR                   
//SORTOUT  DD    DSN=AIDMP.PA2779KS.FYTD(+1),
//             DISP=(,CATLG,KEEP),                                     
//             DCB=(AID.DSCB,RECFM=FB,LRECL=150,BLKSIZE=32700),         
//             UNIT=DISK,SPACE=(CYL,(300,50),RLSE),MGMTCLAS=GDG         
//SYSIN    DD    DSN=AID9297.DATALIB(SM2779Q5),DISP=SHR                 
//* 

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
                                  SYSIN INCLUDE


As you surmised the SYSIN utilises an "Include" that Include looks like:

MERGE FIELDS=(01,01,CH,A,     TP12-REPORT-ID             
              35,01,AQ,A,     TP12-RECEIPT-NO (ALPH CHAR)
              63,24,CH,A,     TP12-VENDOR-NAME           
              02,30,CH,A,     TP12-CHECK-NUM             
              32,13,CH,A)     TP12-RECEIPT-NO           
ALTSEQ CODE=(F0F0,C1F1,C2F2,C3F3,C4F4,C5F5,C6F6,C7F7)   
END 

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
                                  SYSOUT LOG


ICE143I 0 BLOCKSET     MERGE TECHNIQUE SELECTED                                           
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE   
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 14:06 ON MON APR 16, 2012
           MERGE FIELDS=(01,01,CH,A,     TP12-REPORT-ID                                   
                         35,01,AQ,A,     TP12-RECEIPT-NO (ALPH CHAR)                     
                         63,24,CH,A,     TP12-VENDOR-NAME                                 
                         02,30,CH,A,     TP12-CHECK-NUM                                   
                         32,13,CH,A)     TP12-RECEIPT-NO                                 
           ALTSEQ CODE=(F0F0,C1F1,C2F2,C3F3,C4F4,C5F5,C6F6,C7F7)                         
           END                                                                           
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1                                   
ICE751I 0 C5-K90025 C6-K90025 C7-K54603 C8-K62201 E4-K51707 C9-BASE   E5-K62201 E7-K62201
ICE193I 0 ICEAM1 INVOCATION ENVIRONMENT IN EFFECT - ICEAM1 ENVIRONMENT SELECTED           
ICE088I 0 AID9297S.SORT85  .        , INPUT LRECL = 150, BLKSIZE = 27900, TYPE = FB       
ICE093I 0 MAIN STORAGE = (MAX,33554432,33554432)                                         
ICE093I 0 MAIN STORAGE ABOVE 16MB = (33497072,33497072)                                   
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VS                                                   
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VS
ICE128I 0 OPTIONS: SIZE=33554432,MAXLIM=2097152,MINLIM=450560,EQUALS=Y,LIST=Y,ERET=ABEND,M
ICE129I 0 OPTIONS: VIO=Y,RESDNT=ALL ,SMF=NO   ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=N,WRKREL=Y,OUTREL=Y,CKPT=N,COBEXIT=
ICE131I 0 OPTIONS: TMAXLIM=33554432,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=Y,DSA=0 
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITCK=S,PARMDD
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSIZE
ICE235I 0 OPTIONS: NULLOUT=RC0                                                           
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTOUT                                             
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTIN01                                           
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTIN02                                           
ICE068A 0 OUT OF SEQUENCE SORTIN02                                                       
ICE751I 1 DC-K54822 DD-K51707 E8-K61438                                                   
ICE052I 0 END OF DFSORT                                                                      
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Tue Apr 17, 2012 8:11 pm    Post subject: Reply to: Problem in Merge
Reply with quote

do not post attachments, not everybody can see/download them,
doing so reduces the number of useful replies that You might get
Your attachment was inlined and deleted
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Tue Apr 17, 2012 8:20 pm    Post subject: Reply to: Problem in Merge
Reply with quote

I think your assurances may be made of punctured balloons, but can't be sure as you have not showed the cards which sequence the files.

What are you trying to do with the ALTSEQ?
Back to top
View user's profile Send private message
mheatherton

New User


Joined: 26 Jul 2006
Posts: 4
Location: USA

PostPosted: Tue Apr 17, 2012 9:02 pm    Post subject:
Reply with quote

The SORTIN01 as well as the SORTIN02 come in SORTED using Identical CONTROL CARDS with the Exception being SORT FIELDS=

What I am trying to accomplish is at position 33 starts a voucher number TP0, TPA, TPB, TPC, TPD, TPE, TPF or TPG followed by random 9 more numbers. For years they came inner-mixed. The Users now want them seperated through Control Breaking and they want the voucher to appear on the report as TP0s break then TPAs break then TPBs so on and so on. A pure Ascending sort will give you TPA, TPB, TPC….TP0 and a Descending Sort will give you TP0, TPG, TPF ….TPA. I realize this, of course, you know. The sequencing requirements are however TP0, TPA, TPB …. TPG. This can be accomplished by redefineing in a ALTSEQ
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Tue Apr 17, 2012 9:26 pm    Post subject: Reply to: Problem in Merge
Reply with quote

So which is the typo? 33 or 35? Or neither, and there is your problem? Or the problem is within the still unrevealed sort cards for the two files.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Tue Apr 17, 2012 9:40 pm    Post subject:
Reply with quote

mheatherton wrote:
The SORTIN01 as well as the SORTIN02 come in SORTED using Identical CONTROL CARDS with the Exception being SORT FIELDS=


I just re-read this. That could be a pretty big "Exception" :-) Did you mean that?

The sorts have to be the same keys as for the merge, including the ALTSEQ. If the FIELDS= are different, then you have a high chance that the MERGE will feel, rightly, that the something is not in sequence.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Apr 17, 2012 10:54 pm    Post subject:
Reply with quote

mheatherton,

Well, I would bet on DFSORT being correct in this case despite your assurances.

The only field you have that is sorted with ALTSEQ is 35,1. All of the other fields are sorted by normal CH.

In order for your MERGE to work correctly, you would need to have previously sorted input file 1 AND input file2 separately using:

Code:

  SORT FIELDS=(01,01,CH,A,     TP12-REPORT-ID             
              35,01,AQ,A,     TP12-RECEIPT-NO (ALPH CHAR)
              63,24,CH,A,     TP12-VENDOR-NAME           
              02,30,CH,A,     TP12-CHECK-NUM             
              32,13,CH,A)     TP12-RECEIPT-NO           
  ALTSEQ CODE=(F0F0,C1F1,C2F2,C3F3,C4F4,C5F5,C6F6,C7F7)   


As a sanity check, you could use those control statements with AIDMP.PA2779KS.FYTD(-1) as your SORTIN and a temporary file as your SORTOUT. Then use that temporary file as SORTIN02.

Also, if your input data set does not have any duplicates, you could compare AIDMP.PA2779KS.FYTD(-1) to the temporary file. This will tell you if SORTIN02 is really in the correct sequence or not (I'd guess not).

The only other way I could help you is if you sent IBM your input files via a PMR.
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 Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us