IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Include text between records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 17, 2009 11:02 pm
Reply with quote

Hello,

Quote:
where do you plan to get the values ABCDEF , GHIJKL
If i understand, these need not be "gotten".

They are literals and will be embedded in the code. Every 40 records some other (previously defined) literal will be inserted at that point. Volume does not appear to be an issue as there will only be 24 of these literals to be inserted between the 900 records.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Fri Jun 19, 2009 3:03 am
Reply with quote

dick scherrer,

If hard coding 24 headers is what OP wants then here is a job which puts a header at every 40th record.

Code:

//STEP0100 EXEC PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD DSN=input 80 byte file,DISP=SHR
//SORTOUT  DD SYSOUT=*                                             
//SYSIN    DD *                                                     
  OPTION COPY                                                       
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD,START=25,INCR=25))
                                                                   
  OUTFIL IFOUTLEN=80,                                               
  IFTHEN=(WHEN=(81,8,ZD,EQ,01000),BUILD=(C'* ABCDEF - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,02000),BUILD=(C'* GHIJKL - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,03000),BUILD=(C'* MNOPQR - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,04000),BUILD=(C'* STUVWX - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,05000),BUILD=(C'* YZABCD - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,06000),BUILD=(C'* EFGHIJ - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,07000),BUILD=(C'* KLMNOP - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,08000),BUILD=(C'* QRSTUV - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,09000),BUILD=(C'* WXYZAB - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,10000),BUILD=(C'* CDEFGH - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,11000),BUILD=(C'* IJKLMN - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,12000),BUILD=(C'* OPQRST - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,13000),BUILD=(C'* UVWXYZ - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,14000),BUILD=(C'* 123456 - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,15000),BUILD=(C'* 789012 - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,16000),BUILD=(C'* 345678 - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,17000),BUILD=(C'* 901234 - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,18000),BUILD=(C'* 567890 - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,19000),BUILD=(C'* A1B1C1 - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,20000),BUILD=(C'* D1E1F1 - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,21000),BUILD=(C'* G1H1I1 - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,22000),BUILD=(C'* J1K1L1 - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,23000),BUILD=(C'* M1N1O1 - *',/,1,80)), 
  IFTHEN=(WHEN=(81,8,ZD,EQ,24000),BUILD=(C'* P1Q1R1 - *',/,1,80))   
/*
Back to top
View user's profile Send private message
malayajena

New User


Joined: 08 Jul 2006
Posts: 28
Location: Singapore

PostPosted: Sun Jun 21, 2009 2:18 pm
Reply with quote

Thanks Kolusu and Dick. This is what i was intending to do. Its working as per my requirement.

Appreciate the effort you people are making and sorry for the delayed response.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Jun 21, 2009 11:58 pm
Reply with quote

You're welcome - Good to hear it is working - thanks for letting us know icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts To fetch records that has Ttamp value... DFSORT/ICETOOL 2
No new posts ICETOOL returns no records JCL & VSAM 1
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
Search our Forums:

Back to Top