To retrieve the output like this using SORT



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

Re: To retrieve the output like this using SORT

Postby Daouchiche » Tue Jul 29, 2014 7:11 pm

Trying this but still giving me an S322
Daouchiche
 
Posts: 14
Joined: Thu Jul 24, 2014 9:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Re: To retrieve the output like this using SORT

 

Re: To retrieve the output like this using SORT

Postby Daouchiche » Tue Jul 29, 2014 7:18 pm

This gave me an ABENDS322.
Daouchiche
 
Posts: 14
Joined: Thu Jul 24, 2014 9:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: To retrieve the output like this using SORT

Postby Daouchiche » Tue Jul 29, 2014 7:48 pm

Well I use more time and the job was fine but gives no result.
Daouchiche
 
Posts: 14
Joined: Thu Jul 24, 2014 9:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: To retrieve the output like this using SORT

Postby BillyBoyo » Tue Jul 29, 2014 8:51 pm

More CPU time will be used because you can't check across two separate records on INCLUDE COND=/OMIT COND=. So every record on you file has to be tested.

You should do your testing with a small file. Check the condition that you have given. If you still have a problem, show the input with HEX ON for the record and show the control cards that you are using.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: To retrieve the output like this using SORT

Postby Daouchiche » Wed Jul 30, 2014 1:02 am

Her is the input hex on :
----+----1----+----2----+----3----+----4
  }     783091                         
00D10100FFFFFF44444444444444444444444444
0100000178309100000000000000000000000000
----------------------------------------
  }  )  É"  È testR420AL300110Y    j   Y
00D20513770173A8AADFFFCDFFFFFFE00009000E
010E3D101F144F352394201330011080000100F8
----------------------------------------
  }     126061                         
00D10100FFFFFF44444444444444444444444444
0100000112606100000000000000000000000000
----------------------------------------
  }  )  É"  È testR420AL300110Y    j   Y
00D20513770173A8AADFFFCDFFFFFFE00009000E
010E3D101F144F352394201330011080000100F8
----------------------------------------
  }     881309                         
00D10100FFFFFF44444444444444444444444444
----------------------------------------

Here is to job :

//SIDEV01I JOB (0000,0000,0000),'ICETOOL TEST',             
//        NOTIFY=SIDEV01,MSGCLASS=Q,MSGLEVEL=(1,1),CLASS=X 
/*JOBPARM M=4096,T=199,L=99,R=CDT                           
//*                                                         
//STEP1 EXEC PGM=ICETOOL                                   
//TOOLMSG DD SYSOUT=*                                       
//DFSMSG  DD SYSOUT=*                                       
//IN      DD DSN=FILEIN.SMALL,DISP=SHR                     
//OUT     DD DSN=FILEOUT.....,DISP=SHR                     
//*                                                         
//TOOLIN DD *                                               
COPY FROM(IN) TO(OUT) USING(CTL1)                           
//CTL1CNTL DD *                                             
 INREC IFTHEN=(WHEN=INIT,                                   
                  BUILD=(1,4,X,5)),                         
       IFTHEN=(WHEN=GROUP,BEGIN=(5,4,BI,EQ,X'0001D010',     
                                 AND,13,10,CH,EQ,C'126061'),
                          RECORDS=2,                       
                          PUSH=(5:2,1))                     
  OUTFIL OMIT=(5,1,CH,EQ,C' '),     
            BUILD=(1,5,6)                       

The result should be like :

----------------------------------------
  }     126061                         
00D10100FFFFFF44444444444444444444444444
0100000112606100000000000000000000000000
----------------------------------------
  }  )  É"  È testR420AL300110Y    j   Y
00D20513770173A8AADFFFCDFFFFFFE00009000E
010E3D101F144F352394201330011080000100F8
----------------------------------------


Coded
Daouchiche
 
Posts: 14
Joined: Thu Jul 24, 2014 9:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: To retrieve the output like this using SORT

Postby Terry Heinze » Wed Jul 30, 2014 1:15 am

As NicC suggested, "Also, please learn how to use the code tags for posting data, code etc."
.... Terry
Terry Heinze
 
Posts: 193
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 10 times
Been thanked: 11 times

Re: To retrieve the output like this using SORT

Postby NicC » Wed Jul 30, 2014 2:57 am

Agreed. Without coding the data is all over the place - coded it lines up nicely. Please use the "PostReply" button to post a reply not the quick reply and you will find using code tags a cinch. And remember to use the preview button before submittng to ensure that you have done it correctly. And remember, also, that you can edit your post immediately after hitting submit and that will also put you into the full editor.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: To retrieve the output like this using SORT

Postby Daouchiche » Wed Jul 30, 2014 7:03 pm

Thanks a lot. Now it work, here is the solution

INREC IFTHEN=(WHEN=GROUP,BEGIN=(5,4,BI,EQ,X'0001D010',     
                                AND,13,10,CH,EQ,C'123456'),
                         RECORDS=2,                       
                         PUSH=(870:13,6))                 
                                                           
OUTFIL INCLUDE=(870,6,CH,EQ,C'123456'),                   
   IFTHEN=(WHEN=(5,4,BI,EQ,X'0001D010'),BUILD=(1,4,5,14)),
   IFTHEN=(WHEN=(5,4,BI,EQ,X'0001D02E'),BUILD=(1,4,5,863))


Code'd
Daouchiche
 
Posts: 14
Joined: Thu Jul 24, 2014 9:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: To retrieve the output like this using SORT

Postby BillyBoyo » Thu Jul 31, 2014 11:41 am

That looks pretty good.

I'd consider PUSHing the 10 characters, just for flexibility.

Your second IFTEHN on OUTFIL you really want an "else". Try IFTHEN=(WHEN=NONE) which says "if none of the above conditions have been met (you happen to only have one condition above).

Just to note that normally a variable-length record is extended "at the front". You have made your variable-length selected records a fixed-length with 870:13,6. Your final main record may be much longer than you expect, padded with trailing space.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Previous

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post