Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Can this be done in DFSORT

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

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Fri Mar 06, 2009 2:38 am    Post subject: Can this be done in DFSORT
Reply with quote

Hi,

I have a requirement, where I have the input file in this format
C 02111 - 02115 100

I need the output to be

C02111100
C02112100
C02113100
C02114100
C02115100

Note that what we are doing is writing the output record starting with value 02111 to 02115, along with the other two feilds ( C & 100 ).

Please consider any position of input/output fields as I will importing this from excel.

Thanks.
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Mar 06, 2009 3:03 am    Post subject: Reply to: Can this be done in DFSORT
Reply with quote

ap_mainframes,

Try this job

Code:

//STEP0100 EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD *                                                   
C 02111 - 02115 100                                               
//SORTOUT  DD DSN=&&C1,SPACE=(TRK,(1,0),RLSE),DISP=(,PASS)       
//SYSIN    DD *                                                   
  SORT FIELDS=COPY                                               
  OUTREC IFTHEN=(WHEN=INIT,                                       
  OVERLAY=(81:+1,ADD,(11,5,ZD,SUB,3,5,ZD),M11,LENGTH=5)),         
  IFTHEN=(WHEN=(81,5,ZD,GT,1),                                   
  BUILD=(2:C'BUILD=(1,1,SEQNUM,5,ZD,START=',3,5,C',17,3),REPEAT=',
         81,5,80:X)),                                             
  IFTHEN=(WHEN=NONE,                                             
  BUILD=(2:C'BUILD=(1,1,SEQNUM,5,ZD,START=',3,5,C',17,3)',80:X)) 
/*                                                               
//STEP0200 EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD *                                                   
C 02111 - 02115 100                                               
//SORTOUT  DD SYSOUT=*                                           
//SYSIN    DD *                                                   
  SORT FIELDS=COPY                                               
  OUTFIL FNAMES=SORTOUT,                                         
//         DD DSN=&&C1,DISP=SHR                                   
/*
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 Need urgent suggestion on DFSORT subratarec DFSORT/ICETOOL 6 Wed Mar 21, 2018 8:46 pm
No new posts Formatting using DFsort Guru Nandu DFSORT/ICETOOL 5 Thu Nov 30, 2017 7:33 am
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us