Repro from sequential to VSAM file handeling the duplicate



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Re: Repro from sequential to VSAM file handeling the duplicate

Postby Frank Yaeger » Thu Aug 26, 2010 11:01 pm

Here's a DFSORT/ICETOOL job that will do what I think you asked for.

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1 DD DSN=...  sequential input file (FB/25)
//IN2 DD DSN=...  VSAM file
//T2 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT  DD DSN=...  VSAM file
//TOOLIN DD *
COPY FROM(IN2) TO(T2) VSAMTYPE(F)
MERGE FROM(IN1,T2) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
  OPTION EQUALS,ZDPRINT
  MERGE FIELDS=(1,10,BI,A)
  SUM FIELDS=(11,15,ZD)
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: Re: Repro from sequential to VSAM file handeling the duplicate

 

Re: Repro from sequential to VSAM file handeling the duplicate

Postby dick scherrer » Fri Aug 27, 2010 12:17 am

Hello,

Any solution for my problem???
As they say "Patience is a virtue". . .

I was just trying to get enough information posted so that everyone would have the same understanding of the requirement. I usually don't provide "sort solutions" here as we have the people who write/maintain the dfsort product participating in the forum ;)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Repro from sequential to VSAM file handeling the duplicate

Postby ajuatsgp » Fri Aug 27, 2010 1:24 am

Hi,
It's true that Patience is a virtue.
But if I am not getting any solution in next 5-6 hrs I need to write a COBOL pgm,for this. And I really don't want to write a pgm for this.
Let me wait with my fingers crossed.

Thanks
ajuatsgp
 
Posts: 82
Joined: Thu May 20, 2010 6:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Repro from sequential to VSAM file handeling the duplicate

Postby ajuatsgp » Fri Aug 27, 2010 1:34 am

Hi Frank,
I am really sorry but I think the answer u have given is that fullfil my requirement.Have you gone through all the details I have provided.I guess whatever u have answered is just after reading the subject line.
I am sorry again as if your answer covers my requirement I am not able to understand that.

Thanks
ajuatsgp
 
Posts: 82
Joined: Thu May 20, 2010 6:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Repro from sequential to VSAM file handeling the duplicate

Postby enrico-sorichetti » Fri Aug 27, 2010 3:14 am

But if I am not getting any solution in next 5-6 hrs I need to write a COBOL pgm,for this. And I really don't want to write a pgm for this.

the most inappropriate/stupid thing to say on a help forum. Your urgency is just that... yours

remember, answering is on voluntary basis, on responders time and at no charge
if You are lazy, and/or have a strict time constraint the best approach would be to hire a paid <third party> person to do the job
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Repro from sequential to VSAM file handeling the duplicate

Postby dick scherrer » Fri Aug 27, 2010 3:23 am

Hello,

I am sorry again as if your answer covers my requirement I am not able to understand that.
Your time would be better spent running a test with the solution provided rather than worrying if your requirement was understood.

If you run a test and it works, post back that it works. If the test does not work, post back with what happened.

And to repeat what Enrico said - it is not a good practice to bring something urgent to a free forum. It you are paying for support, maybe, but our forum does not provide for urgent. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Repro from sequential to VSAM file handeling the duplicate

Postby Frank Yaeger » Fri Aug 27, 2010 3:26 am

I am really sorry but I think the answer u have given is that fullfil my requirement.Have you gone through all the details I have provided.I guess whatever u have answered is just after reading the subject line.
I am sorry again as if your answer covers my requirement I am not able to understand that.


Huh? I certainly did read through the entire thread and gave you a solution based on what I thought you were asking for. Have you actually tried my solution?

Since we can't sort or merge VSAM and non-VSAM data sets together in one pass, I'm copying the VSAM file to a temporary sequential file, merging the two sequential files, and writing the merged records to the VSAM data set. I'm using SUM to total the amounts for dup records.

If this doesn't work for you, then you haven't explained clearly what you want to do.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: Repro from sequential to VSAM file handeling the duplicate

Postby ajuatsgp » Fri Aug 27, 2010 3:10 pm

Hi,
I have coded as follow:
RX98D1C5
COPY FROM(RXHSTF) TO(TEMPDD) VSAMTYPE(F)
MERGE FROM(BLCNTDD,TEMPDD) TO(OUTFIL) USING(CTL2)

RX98D1C6
OPTION EQUALS,ZDPRINT
MERGE FIELDS=(1,10,BI,A)
SUM FIELDS=(11,15,ZD)


//X98D1600 EXEC PGM=ICETOOL,
// COND=(0,NE)
//*
// INCLUDE MEMBER=SYSOUTS
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD DSN=&PARMLIB1(RX98D1C5),DISP=SHR
//CTL2CNTL DD DSN=&PARMLIB1(RX98D1C6),DISP=SHR
//*
//BLCNTDD DD DSN=Seq file,
// DISP=SHR
//RXHSTF DD DSN=VSAM file,
// DISP=SHR
//TEMPDD DD DSN=Temp file,
// MGMTCLAS=&MD,DATACLAS=&D2,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=25)
//OUTFIL DD DSN=VSAM file,
// DISP=SHR


but I am getting error as:
ICE630I 0 MODE IN EFFECT: STOP

COPY FROM(RXHSTF) TO(TEMPDD) VSAMTYPE(F)
ICE627I 0 DFSORT CALL 0001 FOR COPY FROM RXHSTF TO TEMPDD COMPLETED
ICE602I 0 OPERATION RETURN CODE: 00

MERGE FROM(BLCNTDD,TEMPDD) TO(OUTFIL) USING(CTL2)
$
ICE614A 0 INVALID OPERATOR
ICE602I 0 OPERATION RETURN CODE: 12

Then I tried with giving a colon after the copy statement which I know is not correct, then also I got error as follow:
ICE630I 0 MODE IN EFFECT: STOP

COPY FROM(RXHSTF) TO(TEMPDD) VSAMTYPE(F) -
MERGE FROM(BLCNTDD,TEMPDD) TO(OUTFIL) USING(CTL2)
$
ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER


please let me know where is the issue???
ajuatsgp
 
Posts: 82
Joined: Thu May 20, 2010 6:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Repro from sequential to VSAM file handeling the duplicate

Postby Frank Yaeger » Fri Aug 27, 2010 8:49 pm

This indicates you don't have the DFSORT PTF that supports the MERGE operator. Ask your System Programmer to install z/OS DFSORT V1R5 PTF UK51706 or z/OS DFSORT V1R10 PTF UK51707 (Nov, 2009).

Alternatively, you can use two DFSORT steps like this:

//S1    EXEC  PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  VSAM file
//SORTOUT DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//SYSIN DD *
  OPTION COPY
  RECORD TYPE=F
//S2    EXEC  PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN01 DD DSN=...  sequential input file (FB/25)
//SORTIN02 DD DSN=&&T2,DISP=(OLD,PASS)
//SORTOUT  DD DSN=...  VSAM file
//SYSIN DD *
  OPTION EQUALS,ZDPRINT
  MERGE FIELDS=(1,10,BI,A)
  SUM FIELDS=(11,15,ZD)
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Previous

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post