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 

Sorting Detail records
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Dec 08, 2004 5:27 am    Post subject: Reply with quote

Quote:

All you need to do is to create & catalog the datasets before the sort step. use IEFBR14 to create an empty file (& catalog it). Then use the datasets in the SYNCTOOL/ICETOOL with DISP as SHR.


Phantom,

You can directly catlg the datasets in the sort step itself instead of using an IEFBR14 step to catlg the datasets

i.e
Code:

//T1       DD DSN=USERID.TEMP.DSN1,DISP=(,CATLG),SPACE=(CYL,(X,Y),RLSE)
//T2       DD DSN=USERID.TEMP.DSN2,DISP=(,CATLG),SPACE=(CYL,(X,Y),RLSE)
//CON      DD DSN=*.T1,VOL=REF=*.T1,DISP=OLD             
//         DD DSN=*.T2,VOL=REF=*.T2,DISP=OLD             


Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed Dec 08, 2004 5:58 am    Post subject: Reply with quote

Thanks a lot Kolusu,

I had problems using DISP=SHR but never realised that DISP=OLD will solve that.

Thanks,
Phantom
Back to top
View user's profile Send private message
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Mon Jan 10, 2005 12:06 pm    Post subject: Reply with quote

Hi Kolusu and all,
Can you please help me correct this non-working CTL4CNTL.
Here is a segment of code that I am trying to do, I thought it would work, but it wouldn't Smile

Thank you very much!

Code:

//TOOLIN   DD *
   COUNT FROM(IPFILE)
   COPY FROM(IPFILE) USING(CTL1)
   COPY FROM(CON) USING(CTL2)
   SPLICE FROM(TEMP1) TO(TEMP2) -
           ON(87,8,CH) -
           WITH(1,80) -
           WITHALL USING(CTL3)
   COPY FROM(TEMP2) USING(CTL4)
//CTL1CNTL DD *
   INREC  FIELDS=(1,80,SEQNUM,8,ZD)
   OUTFIL FNAMES=HEADER,INCLUDE=(1,1,CH,EQ,C'*'),
   OUTREC=(1,80,8C'0',SEQNUM,8,ZD,C'H',39,6)
   OUTFIL FNAMES=DETAIL,SAVE,
   OUTREC=(1,88,SEQNUM,8,ZD,C'Z',6X)
//CTL2CNTL DD *
   INREC  FIELDS=(1,96,(81,8,ZD,SUB,89,8,ZD),M11,LENGTH=8,97,7)
   OUTFIL FNAMES=TEMP1,OUTREC=(1,80,106,6,97,8,89,8)
//CTL3CNTL DD *
   OUTFIL FNAMES=TEMP2,OUTREC=(1,86,SEQNUM,7,ZD)
//CTL4CNTL DD *
   OUTFIL FNAMES=TEMP3,INCLUDE COND=(1,1,CH,EQ,C' ',OR,
                                     77,2,CH,EQ,C'TA',OR,
                                     77,2,CH,EQ,C'TB',OR,
                                     77,2,CH,EQ,C'TC',OR),OUTREC=(1,93,2,4,6X) $ PUT INTO TEMP3 THIS INCLUDE COND= DOES NOT WORK.                                     
   OUTFIL FNAMES=TEMP4,INCLUDE=(77,2,CH,EQ,C'TT'),OUTREC=(1,93,10X,11,4) $ PUT INTO TEMP4
   OUTFIL FNAMES=TEMP5,SAVE,OUTREC=(1,93,1,10) $ PUT EVERYTHING ELSE INTO TEMP5
/*
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Jan 10, 2005 12:28 pm    Post subject: Reply with quote

nguyenh,

You have an extra OR in the include cond after 'TC' for Temp3. Also you should just have INCLUDE on OUTFIL , instead of INCLUDE COND. Change your CTL4CNTL to the following.
Code:

//CTL4CNTL DD *
   OUTFIL FNAMES=TEMP3,
   INCLUDE=(1,1,CH,EQ,C' ',OR,
            77,2,CH,EQ,C'TA',OR,
            77,2,CH,EQ,C'TB',OR,
            77,2,CH,EQ,C'TC'),
   OUTREC=(1,93,2,4,6X)         
   OUTFIL FNAMES=TEMP4,INCLUDE=(77,2,CH,EQ,C'TT'),
   OUTREC=(1,93,10X,11,4)   
   OUTFIL FNAMES=TEMP5,SAVE,
   OUTREC=(1,93,1,10)
/*


Hope this helps...

Cheers

kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Mon Jan 10, 2005 2:00 pm    Post subject: Reply with quote

Kolusu,
Code:

You have an extra OR in the include cond after 'TC' for Temp3.

Oh, That was just a typo when message is being posted.

Code:
Also you should just have INCLUDE on OUTFIL , instead of INCLUDE COND. Change your CTL4CNTL to the following.


I thought I already tried this, but it didn't work, I may have done some thing wrong Smile let me try it and let you know.

Thanks alot Kolusu!
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Jan 10, 2005 2:09 pm    Post subject: Reply with quote

nguyenh,

Did you try with suggested code in my previous post? if you did try then please post your TOOLMSG & DFSMSG messages.

Thanks

kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Mon Jan 10, 2005 2:42 pm    Post subject: Reply with quote

kOLUSU,

I just already tried your suggested solution. It worked better than I expected. Smile
wonderful!

Thank you so very much.
Back to top
View user's profile Send private message
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Mon Jan 10, 2005 3:15 pm    Post subject: Reply with quote

Hello Kolusu,
Could you please tell me what are my errors here? It looks correct to me, but I keep getting these errors
Code:

STMT NO. MESSAGE

297 IEF645I INVALID REFERBACK IN THE DSNAME FIELD
298 IEF645I INVALID REFERBACK IN THE DSNAME FIELD
299 IEF645I INVALID REFERBACK IN THE DSNAME FIELD
300 IEF645I INVALID REFERBACK IN THE DSNAME FIELD
301 IEF645I INVALID REFERBACK IN THE DSNAME FIELD
302 IEF645I INVALID REFERBACK IN THE DSNAME FIELD



Here is my JCL:

Code:

283 //IPFILE   DD DSN=NSDC656.TEMP1,DISP=SHR
284 //OPFILE   DD DSN=NSDC656.OLDLIST,DISP=(OLD,KEEP)
285 //HEADER   DD DSN=NSDC656.HEADER,
//   DISP=(NEW,CATLG),SPACE=(CYL,(20,10),RLSE)
286 //DETAIL   DD DSN=NSDC656.DETAIL,
//   DISP=(NEW,CATLG),SPACE=(CYL,(20,10),RLSE)
287 //CON   DD DSN=*.HEADER,VOL=REF=*.HEADER,DISP=OLD
288 //   DD DSN=*.DETAIL,VOL=REF=*.DETAIL,DISP=OLD
289 //TEMP1   DD DSN=NSDC656.A1,DISP=(NEW,CATLG),SPACE=(CYL,(20,10),RLSE)
290 //TEMP2   DD DSN=NSDC656.A2,DISP=(NEW,CATLG),SPACE=(CYL,(20,10),RLSE)
291 //TEMP3   DD DSN=NSDC656.A3,DISP=(NEW,CATLG),SPACE=(CYL,(20,10),RLSE)
292 //TEMP4   DD DSN=NSDC656.A4,DISP=(NEW,CATLG),SPACE=(CYL,(20,10),RLSE)
293 //TEMP5   DD DSN=NSDC656.A5,DISP=(NEW,CATLG),SPACE=(CYL,(20,10),RLSE)
294 //TEMP6   DD DSN=NSDC656.A6,DISP=(NEW,CATLG),SPACE=(CYL,(20,10),RLSE)
295 //TEMP7   DD DSN=NSDC656.A7,DISP=(NEW,CATLG),SPACE=(CYL,(20,10),RLSE)
296 //TEMP8   DD DSN=NSDC656.A8,DISP=(NEW,CATLG),SPACE=(CYL,(20,10),RLSE)
297 //TEMP9   DD DSN=*.A3,VOL=REF=*.A3,DISP=OLD
298 //   DD DSN=*.A4,VOL=REF=*.A4,DISP=OLD
299 //   DD DSN=*.A5,VOL=REF=*.A5,DISP=OLD
300 //   DD DSN=*.A6,VOL=REF=*.A6,DISP=OLD
301 //   DD DSN=*.A7,VOL=REF=*.A7,DISP=OLD
302 //   DD DSN=*.A8,VOL=REF=*.A8,DISP=OLD
303 //TOOLIN   DD *




Thank you!
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Jan 10, 2005 3:48 pm    Post subject: Reply with quote

Code:

//TEMP9   DD DSN=*.A3,VOL=REF=*.A3,DISP=OLD
//        DD DSN=*.A4,VOL=REF=*.A4,DISP=OLD
//        DD DSN=*.A5,VOL=REF=*.A5,DISP=OLD
//        DD DSN=*.A6,VOL=REF=*.A6,DISP=OLD
//        DD DSN=*.A7,VOL=REF=*.A7,DISP=OLD
//        DD DSN=*.A8,VOL=REF=*.A8,DISP=OLD


You are referring to a ddname which is not present. If your intetion is to concatenate temp3 thru temp 8 then you need to code it as below

Code:

//TEMP9   DD DSN=*.TEMP3,VOL=REF=*.TEMP3,DISP=OLD
//        DD DSN=*.TEMP4,VOL=REF=*.TEMP4,DISP=OLD
//        DD DSN=*.TEMP5,VOL=REF=*.TEMP5,DISP=OLD
//        DD DSN=*.TEMP6,VOL=REF=*.TEMP6,DISP=OLD
//        DD DSN=*.TEMP7,VOL=REF=*.TEMP7,DISP=OLD
//        DD DSN=*.TEMP8,VOL=REF=*.TEMP8,DISP=OLD


Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Mon Jan 10, 2005 4:04 pm    Post subject: Reply with quote

Thanks Kolusu,

I see, I thought *.DataSetName means WhatEverHighLevelQualifier.ActualDataSetName.

I look at the example in the link below, they named both DSN = T1 therefore I am confused. Thank you again!

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1cg00/3.1.16?ACTION=MATCHES&REQUEST=Vol%3DRef%3D&TYPE=FUZZY&SHELF=&DT=20031124150117&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
Back to top
View user's profile Send private message
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Wed Jan 12, 2005 2:46 pm    Post subject: Reply with quote

Hi kolusu,
I am trying to reference temporary datasets and getting this error. Why does that happen? is it not possible to reference temporary datasets the same way as we do with permanent datasets? Can you show me how to fix this error. Thanks!

:
Code:

//HEADER   DD DSN=&&&&HEADER,DISP=(NEW,PASS)
//DETAIL   DD DSN=&&&&DETAIL,DISP=(NEW,PASS)
//COMBIN   DD DSN=*.HEADER,VOL=REF=*.HEADER,DISP=OLD
//   DD DSN=*.DETAIL,VOL=REF=*.DETAIL,DISP=OLD


I got this error:
Code:

317 IEF648I INVALID DISP FIELD- PASS SUBSTITUTED
318 IEF648I INVALID DISP FIELD- PASS SUBSTITUTED


I tried this too, but get difference errors.
Code:

//HEADER   DD DSN=&&&&HEADER,DISP=(NEW,PASS)
//DETAIL   DD DSN=&&&&DETAIL,DISP=(NEW,PASS)
//COMBIN   DD DSN=HEADER
//   DD DSN=DETAIL
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Jan 12, 2005 2:56 pm    Post subject: Reply with quote

nguyenh,

You can create a temporary dataset using 2 ampersands followed by a character string 1 to 8 characters in length. You had 4 ampersands which is not a valid syntax

However, if you code a data set name as a symbolic parameter (by coding DSNAME=&xxxxxxxx), and do not assign a value to or nullify the symbolic parameter, the system will process it as a temporary data set name.

So change your file allocation to either have 2 or 1 ampersand.

Code:

//HEADER   DD DSN=&&HEADER,DISP=(NEW,PASS),SPACE=(CYL,(X,Y),RLSE)
//DETAIL   DD DSN=&&DETAIL,DISP=(NEW,PASS),SPACE=(CYL,(X,Y),RLSE) 
//COMBIN   DD DSN=*.HEADER,VOL=REF=*.HEADER,DISP=OLD
//         DD DSN=*.DETAIL,VOL=REF=*.DETAIL,DISP=OLD


or
Code:

//HEADER   DD DSN=&HEADER,DISP=(NEW,PASS),SPACE=(CYL,(X,Y),RLSE)
//DETAIL   DD DSN=&DETAIL,DISP=(NEW,PASS),SPACE=(CYL,(X,Y),RLSE) 
//COMBIN   DD DSN=*.HEADER,VOL=REF=*.HEADER,DISP=OLD
//         DD DSN=*.DETAIL,VOL=REF=*.DETAIL,DISP=OLD


Hope this helps...

Cheers

kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Wed Jan 12, 2005 3:10 pm    Post subject: Reply with quote

Thanks Kolusu,
Some how, I dont know if it is our installation dependant or what, again I dont know. but whenever I use 2 ampercents, it takes 2 ampercents and convert to 1 ampercent and it fails, i look at other people codes in my shop they all used 4 amps for temp datasets, which will returns 2 amps. Back to my previous question. it seams that when i use this code it works. I need to check it again. Thanks again!

Code:

//DETAIL   DD DSN=&&&&DETAIL,DISP=(NEW,PASS)
//COMBIN   DD DSN=&&&&HDR1,VOL=REF=*.HEADER,DISP=(NEW,PASS)
//   DD DSN=&&&&DET1,VOL=REF=*.DETAIL,DISP=(NEW,PASS)
Back to top
View user's profile Send private message
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Fri Jan 14, 2005 3:20 pm    Post subject: Reply with quote

Kolusu,
You are right I can now get it to work with just && instead 4 amps. Thanks a lot.

I have another question, I have problem to find the correct syntax for the following statements? could you please show me how this is done the right way. Thanks you!

Code:

//CON&DSN1 IF ( (&DSN1 EQ 1 OR (&DSN1 EQ 2)) AND
//            (&DSN2 EQ 'OLDLIST' OR (&DSN2 EQ 'NEWLIST' ) ) ) THEN
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jan 14, 2005 4:07 pm    Post subject: Reply with quote

Quote:

I have another question, I have problem to find the correct syntax for the following statements? could you please show me how this is done the right way. Thanks you!


//CON&DSN1 IF ( (&DSN1 EQ 1 OR (&DSN1 EQ 2)) AND
// (&DSN2 EQ 'OLDLIST' OR (&DSN2 EQ 'NEWLIST' ) ) ) THEN



nguyenh,

I am lost here ! what is the language you are referring to ?

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/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 -> Utilities All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
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