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
malayajena

New User


Joined: 08 Jul 2006
Posts: 28
Location: Singapore

PostPosted: Tue Jun 16, 2009 8:31 pm
Reply with quote

hi Kolusu

Header values are different texts but we know exactly what are these values after every 40th record.So the point is if you can show me how to insert those variable headers in 40th,80th,120th etc records then i can amend it according to my requirement and insert the proper headers. I have 24 such headers which comes after every 40th record. Now, let me know if this seems a feasible Job which can be done through JCl. Appreciate your help so far and let me know if you have any more concerns.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Jun 16, 2009 9:01 pm
Reply with quote

malayajena,

*Sigh* This is worse than a dentist trying to pull a tooth. What part of this did you not understand?

skolusu wrote:
where do you plan to get the values ABCDEF , GHIJKL ?Are these values anywhere in the record? or you want a random string? If it is indeed a random string , what happens if the input has 10 millions of records? Are you going to have 250k of random strings?


malayajena wrote:
Now, let me know if this seems a feasible Job which can be done through JCl.


For the record JCL canNOT do anything. It is your programs and utilities which can get you the desired results. JCL does not do anything other than establish an environment in which the STEPs of the JOB can execute.
Back to top
View user's profile Send private message
malayajena

New User


Joined: 08 Jul 2006
Posts: 28
Location: Singapore

PostPosted: Wed Jun 17, 2009 5:56 pm
Reply with quote

Alright, then better we rest this requirement.Thanks for your valubale time.
Really appreciate it but simultaneously little dissapointed too bacause of the unclear air stil there:) and i couldn't help you understand it.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jun 17, 2009 6:19 pm
Reply with quote

Quote:
Really appreciate it but simultaneously little dissapointed too bacause of the unclear air stil there:) and i couldn't help you understand it.

You should be disappointed toward Yourself, Not Kolusu or anybody' s else fault ...
You simply were not able to understand the clarification questions posed
or rather not able or not willing to explain icon_evil.gif

in the sample/solution posted the line/record/header/trailer/<call it in any f* name You want> to be inserted was hardcoded in the sort control statements

Kolusu , in order to give maximum flexibility to his solution for the new requirement

I.E.
not having the strings hardcoded in the sort control statements

was asking how You wanted to provide the line/record/header/trailer/<call it in any f* name You want>

I.E.
if they were somehow part of the input file,
or You were planning of providing them as an additional file to be fed as additional input to sort
Back to top
View user's profile Send private message
malayajena

New User


Joined: 08 Jul 2006
Posts: 28
Location: Singapore

PostPosted: Wed Jun 17, 2009 7:12 pm
Reply with quote

I think i will look for an alternative to this as i am also not sure how i will be able to make you guys understand. So sorry again for making you guys spend time on this so far.

Thanks and Regards.
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: 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 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top