Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can we do the following JCL in one step using DFSORT/ICETOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
adushkin

New User


Joined: 02 Jun 2006
Posts: 6

PostPosted: Thu Oct 18, 2007 3:13 am    Post subject: Can we do the following JCL in one step using DFSORT/ICETOOL
Reply with quote

I have a below requirement.
My input file has records Lrecl=80.
Can we do the following JCL in one step.
If not, may be first two step
Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN    DD *
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
GGG          11111112         5CD200201B000000000000000 000000000239913
GGG          11111112         BO0200201B000000000139913 000000000000000
GGG          11111112         C10200201B000000000100000 000000000000000
GGG          11111112         5CD200202B000000000000000 000000000362915
GGG          11111112         BO0200202B000000000162915 000000000000000
GGG          11111112         C10200202B000000000100000 000000000000000
GGG          11111112         H40200202B000000000100000 000000000000000
GGG          11111112         5CD200203B000000000000000 000000005995929-
GGG          11111112         BO0200203B000000005995929-000000000000000
GGG          11111112         5CD200204B000000000000000 000000000945346
GGG          11111112         BO0200204B000000000145346 000000000000000
GGG          11111112         C10200204B000000000800000 000000000000000
//*                              upto12(dec)
/*
//SORTOUT   DD DSN=OUTPUT.TEMP,
//*         DCB=(DCBLABEL,RECFM=FB,LRECL=271,BLKSIZE=0)
//SYSIN    DD *
 SORT FIELDS=(14,20,CH,A)
 INREC OVERLAY=(31:31,3,CHANGE=(3,C'5CD',C'999'),
 NOMATCH=(31,3))
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN    DD  DSN=OUTPUT.TEMP,DISP=SHR
//SORTOUT   DD DSN=OUTPUT.TEMP.OK,
//*         DCB=(DCBLABEL,RECFM=FB,LRECL=271,BLKSIZE=0)
//SYSIN    DD *
 OPTION COPY
 INREC OVERLAY=(31:31,3,CHANGE=(3,C'999',C'5CD'),
 NOMATCH=(31,3))
/*
//PS010   EXEC PGM=COBOL
//*--------------------------------------------------------------
//FCSIN    DD  DSN=OUTPUT.TEMP.OK,
//             DISP=SHR
//FCSOUT   DD  DSN=OUTPUT.test.file
//             DCB=(DCBLABEL,RECFM=FB,LRECL=271,BLKSIZE=0)


Output file

GGG   AAAA        CCCC   YEAR   B   JAN    FEB     MAR     APR    TOTAL
---     --------        ----    ----    -       ------  ------  -------- ------ -----
GGG   11111112   BO0   2002   B   139913   162915   -5995929 145346   
GGG   11111112   C10   2002   B   100000   100000          0 800000   
GGG   11111112   H40   2002   B        0   100000          0      0   
GGG   11111112   5CD   2002   B   239913   362915   -5995929 945346   -4447755

Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Oct 18, 2007 4:28 am    Post subject:
Reply with quote

It looks like your first two steps ensure that '5CD' sorts last even if you have a higher value like '888' (which you don't in your example). If so, you can do that in one step like this:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN    DD DSN=...  input file
//SORTOUT   DD DSN=...  output file
//SYSIN DD *
  INREC IFTHEN=(WHEN=(31,3,CH,EQ,C'5CD'),OVERLAY=(31:C'999'))
  SORT FIELDS=(14,20,CH,A)
  OUTREC IFTHEN=(WHEN=(31,3,CH,EQ,C'999'),OVERLAY=(31:C'5CD'))
/*


In the future, please explain what you're trying to do in detail so we don't have to guess.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us