Specify a record and next of this record.



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

Specify a record and next of this record.

Postby Mehdi shri » Wed Oct 03, 2012 11:14 am

Dear friend
I have an input like this:

ACCO 0100003580
ACCO 0100003581
MONT 9926
ACCO 0100003582
MONT 9926
ACCO 0100003583
ACCO 0100003584
ACCO 0100003586
MONT 9926
ACCO 0100003587
MONT 9926

I want to extracat records which has contain "MONT 9926" right after these whit itself. Output I want is:

ACCO 0100003581
MONT 9926
ACCO 0100003582
MONT 9926
ACCO 0100003586
MONT 9926
ACCO 0100003587
MONT 9926
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

Re: Specify a record and next of this record.

Postby skolusu » Wed Oct 03, 2012 9:15 pm

Mehdi shri,

Use the following the DFSORT/ICETOOL JCL which will give you the desired results
//STEP0100 EXEC PGM=ICETOOL                               
//TOOLMSG  DD SYSOUT=*                                   
//DFSMSG   DD SYSOUT=*                                   
//IN       DD *                                           
ACCO 0100003580                                           
ACCO 0100003581                                           
MONT 9926                                                 
ACCO 0100003582                                           
MONT 9926                                                 
ACCO 0100003583                                           
ACCO 0100003584                                           
ACCO 0100003586                                           
MONT 9926                                                 
ACCO 0100003587                                           
MONT 9926                                                 
//OUT      DD SYSOUT=*                                   
//TOOLIN   DD *                                           
  SELECT FROM(IN) TO(OUT) ON(81,8,CH) ALLDUPS USING(CTL1)
//CTL1CNTL DD *                                           
  OPTION COPY                                             
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),     
  IFTHEN=(WHEN=(1,9,CH,EQ,C'MONT 9926'),                 
  OVERLAY=(81:81,8,ZD,SUB,+1,M11,LENGTH=8))               
                                                         
  OUTFIL BUILD=(1,80)                                     
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Specify a record and next of this record.

Postby Mehdi shri » Sun Oct 07, 2012 1:59 pm

Dear skolusu
I used this your offer but I give MAXCC=16 and :
ICE056A 9 CTL1OUT NOT DEFINED

Wahts the CTL1OUT ? And how is must be define?
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

Re: Specify a record and next of this record.

Postby NicC » Sun Oct 07, 2012 3:06 pm

Did you cut and paste Kolusu's solution? What do you have for the TO parameter on the TOOLIN card? If you hve CTL1OUT then that is the area in which your problem lies but without you posting what JCL and control cards you used for the step (in code tags) then we do not really know where you went wrong. Kolusu runs his solutions before posting so if there is an error it is on your part.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Specify a record and next of this record.

Postby dick scherrer » Mon Oct 08, 2012 8:30 am

Hello,

If you Did Not copy/paste, but rather re-typed, start over.

If you copy/paste and still have a problem, you need to post the jcl and sort control statements you submitted and the informational and diagnostic into presented by the run.

Do NOT try to post only what you believe we need to help.
Hope this helps,
d.sch.

These users thanked the author dick scherrer for the post:
Mehdi shri (Mon Oct 08, 2012 12:39 pm)
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Specify a record and next of this record.

Postby Mehdi shri » Mon Oct 08, 2012 12:35 pm

This is my JCL:

//MESORT03 JOB 4320,A-0055,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID
//STEP0100 EXEC PGM=ICETOOL                                 
//TOOLMSG  DD SYSOUT=*                                       
//DFSMSG   DD SYSOUT=*                                       
//IN       DD *                                             
  ACCO 0100003580                                           
  ACCO 0100003581                                           
  MONT 9926                                                 
  ACCO 0100003582                                           
  MONT 9926                                                 
  ACCO 0100003583                                           
  ACCO 0100003584                                           
  ACCO 0100003586                                           
  MONT 9926                                                 
  ACCO 0100003587                                           
  MONT 9926                                                 
//OUT      DD SYSOUT=*   
//TOOLIN   DD *       
  SELECT FROM(IN) TO(OUT) ON(81,8,CH) ALLDUPS USING(CTL1)
//CTL1CNTL DD *             
  OPTION COPY 
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),
  IFTHEN=(WHEN=(1,9,CH,EQ,C'MONT 9926'), 
  OVERLAY=(81:81,8,ZD,SUB,+1,M11,LENGTH=8))         
                                                     
  OUTFIL BUILD=(1,80)                               
//*                                                 

And the following lines shows the DFSMSG STEP0100:


ICE146I 0 END OF STATEMENTS FROM CTL1CNTL - PARAMETER LIST STATEMENTS FOLLOW       
          DEBUG NOABEND,ESTAE                       
          OPTION MSGDDN=DFSMSG,LIST,MSGPRT=ALL,RESINV=0,SORTDD=CTL1,SORTIN=IN,SOR* TOUT=OUT,DYNALLOC,SZERO,EQUALS,NOVLSHRT,LOCALE=NONE,NOCH*                            ECK                                                         
          SORT FIELDS=(81,8,CH,A)                                                   
          MODS E35=(ICE35DU,12288)                                                   
ICE056A 9 CTL1OUT  NOT DEFINED                                                       
ICE751I 0 C5-Q95214 C6-Q95214 C7-BASE   C8-Q95214 E7-Q95214                         
ICE052I 3 END OF DFSORT                                                             

Thanks a lot.
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

Re: Specify a record and next of this record.

Postby NicC » Mon Oct 08, 2012 1:02 pm

When pasting stuff from your mainframe session please use the code tags. You find the button for these in the "Full Editor". coding preserves spacing so that we can determine elementary things such as the column that things start in and makes the stuff easier to read. I have coded your stuff for you.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Specify a record and next of this record.

Postby skolusu » Mon Oct 08, 2012 9:55 pm

Mehdi shri wrote:
ICE751I 0 C5-Q95214 C6-Q95214 C7-BASE   C8-Q95214 E7-Q95214                         



You did not show us the complete DFSMSG. The above information message indicates that you are running an unsupported version of DFSORT. You are running z/OS DFSORT V1R5 with PTF UQ95214 which is released in December, 2004. DFSORT V1R5 is out of service. You need to get to the latest version of DFSORT.


Meanwhile try changing the OUTFIL statement in CTL1CNTL as shown below and re-run your job.

OUTFIL BUILD=(1,80)   

to

OUTFIL FNAMES=OUT,BUILD=(1,80)
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

These users thanked the author skolusu for the post:
Mehdi shri (Mon Oct 08, 2012 10:22 pm)
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Specify a record and next of this record.

Postby Mehdi shri » Mon Oct 08, 2012 10:19 pm

Thank you friend.
It is run correctly and MAXCC=00
Thanks a lot.
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

Re: Specify a record and next of this record.

Postby dick scherrer » Tue Oct 09, 2012 7:54 pm

Hello,

Suggest you speak with your manager or technical support to have your SORT upgraded.

With what you have there are MANY features that will be unavailable to you. When you find an example that does exactly what you want and you cannot use it, it is quite frustrating.

There is also no good business reason to run products that are no longer supported. It is rather risky . . . fwiw.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post