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
 
Creating Mutliple records from an input record using ICETOOL

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

New User


Joined: 25 Apr 2006
Posts: 32
Location: India

PostPosted: Fri Sep 05, 2008 5:28 am    Post subject: Creating Mutliple records from an input record using ICETOOL
Reply with quote

Hi All,

My requirement is to insert a string "<Page Break>" before each page header in report.Can we do this using ICETOOL?

I can not use rexx as my report has 200,000 lines and i do not want write a COBOL program for this.

Code:

Input:
-------
1JUL'09,       XXXXX Compnay     PAGE1

Name   Salary
-------  -------
AAAA   $200
BBBB   $100

1JUL'09,       XXXXX Compnay     PAGE2

Name   Salary
-------  -------
CCCC   $200
DDDD   $100

Output:
---------
<Page Break>
1JUL'09,       XXXXX Compnay     PAGE1

Name   Salary
-------  -------
AAAA   $200
BBBB   $100

<Page Break>
1JUL'09,       XXXXX Compnay     PAGE2

Name   Salary
-------  -------
CCCC   $200
DDDD   $100


Any help is much appreciated.
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: Fri Sep 05, 2008 5:50 am    Post subject:
Reply with quote

You can use a DFSORT/ICETOOL job like the following to do what you asked for. I assumed your input file has RECFM=FB and LRECL=80 and the page header record can be identified by 'PAGE' in positions 34-37. You can change the job appropriately if those assumptions are incorrect.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=...  input file (FB/80)
//OUT DD DSN=...  output file (FB/80)
//TOOLIN   DD    *
COPY FROM(IN) USING(CTL1)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=OUT,
   IFTHEN=(WHEN=(34,4,CH,EQ,C'PAGE'),
     BUILD=(C'<Page Break>',/,1,80))
/*
Back to top
View user's profile Send private message
satya12

New User


Joined: 25 Apr 2006
Posts: 32
Location: India

PostPosted: Fri Sep 05, 2008 6:03 am    Post subject: Reply to: Creating Mutliple records from an input record usi
Reply with quote

My file is FBA with 133 record lenght..Anyway i modified your CODE and it worked.

Thanks a lot for the help.
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 Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 4 Fri Sep 22, 2017 4:56 pm
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am

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