Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How to code JCL for the below condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
sunojsm
Warnings : 1

New User


Joined: 21 Jun 2004
Posts: 48
Location: Heaven

PostPosted: Tue Apr 12, 2005 11:53 am    Post subject: How to code JCL for the below condition
Reply with quote

hi,

To code JCL for the given below condition,

1. my input file contains customer id,quantity and price as the fields
with 200 records(not sorted)...

2. my output should contain 2 files....

3. 1st file's output should be top 50 records in accordance with
sorted quantity
4. 2nd file output should be top 50 records in accordance with the
sorted price.
Back to top
View user's profile Send private message
References
MGIndaco

Moderator


Joined: 10 Mar 2005
Posts: 478
Location: Milan, Italy

PostPosted: Tue Apr 12, 2005 12:51 pm    Post subject:
Reply with quote

You can use the DFSORT/ICETOOL utitily as you can see below:

Code:

//STEP030S EXEC PGM=ICETOOL                                 
//TOOLMSG  DD SYSOUT=*                                     
//DFSMSG   DD SYSOUT=*                                     
//INP1     DD DISP=SHR,DSN=INPUT
//OUT1     DD DISP=(,PASS),                     
//            UNIT=SYSDA,SPACE=(CYL,(10,10),RLSE),   
//            DSN=&&OUT1                                   
//OUT2     DD DISP=(,PASS),                     
//            UNIT=SYSDA,SPACE=(CYL,(10,10),RLSE),   
//            DSN=&&OUT2                                   
//TOOLIN   DD *                             
 SORT FROM(INP1)  USING(CTL1)       
 SORT FROM(INP1)  USING(CTL2)                           
//CTL1CNTL DD *
  SORT FIELDS=(quantity,A)
  OUTFIL FNAMES=OUT1,ENDREC=50
//CTL2CNTL DD *
  SORT FIELDS=(price,A)
  OUTFIL FNAMES=OUT2,ENDREC=50
/*
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1