MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DFSORT, Help Urgently needed!

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
siddharth
Beginner


Joined: 25 Jul 2003
Posts: 15
Topics: 7

PostPosted: Sat Jul 26, 2003 6:48 pm    Post subject: DFSORT, Help Urgently needed! Reply with quote

Can I have more than one SORTIN datasets which are having different record structure in a single SORT step. Yet, there is one field common across all these datasets at different column positions.
For e.g; Lets say there are three such datasets A, B and C
In A,
The key-field is at position 10
In B,
The key-field is at position 20
In C,
The key-field is at position 30
I need to sort all these datasets on this one common field(key-field) and write into the sortout. Is this possible in ONE sort step?
Back to top
View user's profile Send private message
Alain Benveniste
Beginner


Joined: 04 May 2003
Posts: 92
Topics: 4
Location: Paris, France

PostPosted: Sun Jul 27, 2003 5:50 am    Post subject: Reply with quote

Siddharth,

I assumed you have :
- records length = 80
- keys length = 1

The method is to copy all the keys you want to sort in front of each record.
Because you have an urgent need I give you a jcl that I can't test.
Code:

//STEP0001 EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//TOOLIN   DD *
  COPY FROM(A)   TO(OUT)  USING(ICE0)
  COPY FROM(B)   TO(OUT)  USING(ICE1)
  COPY FROM(C)   TO(OUT)  USING(ICE2)
  SORT FROM(OUT) TO(OUTX) USING(ICE3)
/*
//A        DD DSN=...
//B        DD DSN=...
//C        DD DSN=...
//OUT      DD DSN=&&ST01FI01,
//            DISP=(MOD,DELETE,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(1,1),RLSE),
//            DCB=(RECFM=FB,LRECL=81)
//OUTX     DD SYSOUT=*
//ICE0CNTL DD *
  OUTREC FIELDS=(1:10,1,2:1,80)
/*
//ICE1CNTL DD *
  OUTREC FIELDS=(1:20,1,2:1,80)
/*
//ICE2CNTL DD *
  OUTREC FIELDS=(1:30,1,2:1,80)
/*
//ICE3CNTL DD *
  SORT FIELDS=(1,1,CH,A)
/*

I hope it will help you

Alain
Back to top
View user's profile Send private message
siddharth
Beginner


Joined: 25 Jul 2003
Posts: 15
Topics: 7

PostPosted: Sun Jul 27, 2003 8:42 am    Post subject: Reply with quote

Alien, Thanks for the response.
I'll try your suggestion and let you know if it works.

Thanks again,
Siddharth.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Sun Jul 27, 2003 11:11 am    Post subject: Reply with quote

Siddharth,

Alain has the right idea, but he forgot to remove the extra key byte from position 1 of the output records. To do that, the job should be:

Code:

//STEP0001 EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//TOOLIN   DD *
  COPY FROM(A)   TO(OUT)  USING(ICE0)
  COPY FROM(B)   TO(OUT)  USING(ICE1)
  COPY FROM(C)   TO(OUT)  USING(ICE2)
  SORT FROM(OUT) TO(OUTX) USING(ICE3)
/*
//A        DD DSN=...
//B        DD DSN=...
//C        DD DSN=...
//OUT      DD DSN=&&ST01FI01,
//            DISP=(MOD,DELETE,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(1,1),RLSE)
//OUTX     DD SYSOUT=*
//ICE0CNTL DD *
  OUTREC FIELDS=(1:10,1,2:1,80)
/*
//ICE1CNTL DD *
  OUTREC FIELDS=(1:20,1,2:1,80)
/*
//ICE2CNTL DD *
  OUTREC FIELDS=(1:30,1,2:1,80)
/*
//ICE3CNTL DD *
  SORT FIELDS=(1,1,CH,A)
  OUTREC FIELDS=(2,80)
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
siddharth
Beginner


Joined: 25 Jul 2003
Posts: 15
Topics: 7

PostPosted: Sun Jul 27, 2003 7:49 pm    Post subject: Reply with quote

Thanks, for all the responses.

But I am having a problem here, I am getting an error saying that the ICETOOL program is NOT FOUND.
Would you be knowing which library I need to reference in the JOBLIB/STEPLIB in order for the job to find that utility?

Regards,
Siddharth.
Back to top
View user's profile Send private message
Alain Benveniste
Beginner


Joined: 04 May 2003
Posts: 92
Topics: 4
Location: Paris, France

PostPosted: Sun Jul 27, 2003 11:53 pm    Post subject: Reply with quote

Siddhart

When you execute a simple sort, does all the sort messages are prefixed by WER ? In this case you don't have DFSORT/ICETOOL (IBM product) but
SYNCSORT.
You have the technic : there is nothing hard to customize it with SYNCTOOL.

alain
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Jul 28, 2003 5:07 am    Post subject: Reply with quote

siddharth,

change the pgm name to SYNCTOOL and see if it works.

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
siddharth
Beginner


Joined: 25 Jul 2003
Posts: 15
Topics: 7

PostPosted: Mon Jul 28, 2003 10:31 am    Post subject: Reply with quote

Thanks again,

I tried changing the PGM NAME from ICETOOL to SYNCTOOL and it did not give me any errors like "Program Not Found" on JSCAN.
But since, I have changed the program name, would I have to also change in the SYSIN also, from ICECNTL to SYNCCNTL?
Could somebody provide me with a sample JCL using SYNCTOOL?

I appreciate you help.
Thanks a Ton!
Siddharth.
Back to top
View user's profile Send private message
siddharth
Beginner


Joined: 25 Jul 2003
Posts: 15
Topics: 7

PostPosted: Thu Aug 07, 2003 11:19 pm    Post subject: Reply with quote

I tried running the job with the SYNCTOOL step as follows:

//JS160 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
COPY FROM(FILE1) TO(FILE99) USING(ICE0)
COPY FROM(FILE2) TO(FILE99) USING(ICE1)
COPY FROM(FILE3) TO(FILE99) USING(ICE2)
COPY FROM(FILE4) TO(FILE99) USING(ICE3)
COPY FROM(FILE5) TO(FILE99) USING(ICE4)
COPY FROM(FILE6) TO(FILE99) USING(ICE5)
COPY FROM(FILE7) TO(FILE99) USING(ICE6)
SORT FROM(FILE99) TO(OUTX) USING(ICE99)
/*
//FILE1 DD DSN=DLI.K86NPS08.UNLOADLB,DISP=SHR
//FILE2 DD DSN=DLI.K86NPS08.UNLOADBV,DISP=SHR
//FILE3 DD DSN=DLI.K86NPS08.UNLOADBD,DISP=SHR
//FILE4 DD DSN=DLI.K86NPS08.UNLOADQV,DISP=SHR
//FILE5 DD DSN=DLI.K86NPS08.UNLOADSX,DISP=SHR
//FILE6 DD DSN=DLI.K86NPS08.UNLOADRD,DISP=SHR
//FILE7 DD DSN=DLI.K86NPS08.UNLOADSK,DISP=SHR
//*
//OUTX DD SYSOUT=*
//FILE99 DD DSN=DLI.K86NPS08.UNLOADXX,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(100,50),RLSE),
// RECFM=FB,
// LRECL=424,
// BLKSIZE=00000,
// DSORG=PS
//ICE0CNTL DD *
OUTREC FIELDS=(1:129,4,2:1,424)
/*
//ICE1CNTL DD *
OUTREC FIELDS=(1:16,4,2:1,424)
/*
//ICE2CNTL DD *
OUTREC FIELDS=(1:77,4,2:1,424)
/*
//ICE3CNTL DD *
OUTREC FIELDS=(1:15,4,2:1,424)
/*
//ICE4CNTL DD *
OUTREC FIELDS=(1:68,4,2:1,424)
/*
//ICE5CNTL DD *
OUTREC FIELDS=(1:176,4,2:1,424)
/*
//ICE6CNTL DD *
OUTREC FIELDS=(1:17,4,2:1,424)
/*
//ICE7CNTL DD *
SORT FIELDS=(1,4,CH,A)
OUTREC FIELDS=(1,424)
/*
//SYSPRINT DD SYSOUT=*
//*

I got the following error:

SYT000I SYNCTOOL RELEASE 1.3A - COPYRIGHT 1999 SYNCSORT INC.
SYT001I INITIAL PROCESSING MODE IS "STOP"
SYT002I "TOOLIN" INTERFACE BEING USED

COPY FROM(FILE1) TO(FILE99) USING(ICE0)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0001"
********************** E N D O F D A T A ****************************

Could someone please assist on this, how should I resolve this issue?

Thanks for the help all this while,
Regards,
Siddharth.
Back to top
View user's profile Send private message
mayuresh.tendulkar
Beginner


Joined: 25 Apr 2003
Posts: 31
Topics: 6
Location: Pune

PostPosted: Thu Aug 07, 2003 11:27 pm    Post subject: Reply with quote

Hello Siddharth,

SORT FROM(FILE99) TO(OUTX) USING(ICE99)


have you declared the ICE99?????
Also ICE7 is not used...may be that is the ICE99..Just change it and try to run it.

Let me know,

Regards

Mayuresh
Back to top
View user's profile Send private message Send e-mail
siddharth
Beginner


Joined: 25 Jul 2003
Posts: 15
Topics: 7

PostPosted: Thu Aug 07, 2003 11:48 pm    Post subject: Reply with quote

Hi Mayuresh,
Thanks for the prompt answer.

The job failed at ICE0 itself and never reached ICE7.
Anyways changed and tried running as per your suggestion but did not work same error. I think since I am not using ICETOOL but SYNCTOOL, I would have to use not ICEn...where n varies from 0 through 7 but something else. Not aware what I should use there...

Please advise.
Thanks,
Siddharth.
Back to top
View user's profile Send private message
mayuresh.tendulkar
Beginner


Joined: 25 Apr 2003
Posts: 31
Topics: 6
Location: Pune

PostPosted: Fri Aug 08, 2003 12:33 am    Post subject: Reply with quote

Hello Siddharth,

I think you are giving wrong OUTREC FIELD definition.

OUTREC FIELDS=(1:129,4,2:1,424)

Here, as per the definition,
first 4 characters will be from 129th position of input file,

But you are populating the second as 2:1,424

instead of that, it should be OUTREC FIELDS=(1:129,4,5:1,424)

Please do this and let me know.

May be this is the error.
Let me know if this helps you.

Regards

Mayuresh Tendulkar
Back to top
View user's profile Send private message Send e-mail
siddharth
Beginner


Joined: 25 Jul 2003
Posts: 15
Topics: 7

PostPosted: Fri Aug 08, 2003 12:53 am    Post subject: Reply with quote

not working still,...
Back to top
View user's profile Send private message
A.Benveniste
Beginner


Joined: 23 Jun 2003
Posts: 4
Topics: 0

PostPosted: Fri Aug 08, 2003 5:30 am    Post subject: Reply with quote

Change DISP=(NEW...) to DISP=(MOD...) for FILE99
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Aug 08, 2003 5:41 am    Post subject: Reply with quote

siddharth,


You have code disp=new for the output dsn. so for the first copy it is fine but, when it comes to the second copy the system complains of duplicate dataset as it cannot allocate the dataset as the dsn exists. so change your disp=mod.Also posting the error messages (toolmsg , dfsmsg) would help solving your problem in future.

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group