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

Help in using Icetool


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

New User


Joined: 14 Apr 2009
Posts: 14
Location: India

PostPosted: Fri Aug 28, 2009 7:47 pm
Reply with quote

Hi,

I have a file which have header record and details records. The dummy file is given below:

1111 (Header)
BBBBBBBBBBBBBBBBBBBBBBBBBBBB (Detail records)
CCCCCCCCCCCCCCCCCCCCCCCCC
DDDDDDDDDDDDDDDDDDDDDDDDD
2222
EEEEEEEEEEEEEEEEEEEEEEEEEEEE
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
3333
AAAAAAAAAAAAAAAAAAAAAAAAAAAA
SSSSSSSSSSSSSSSSSSSSSSSSSSSS


The header record is always 4 bytes and details record is of 28 bytes.

I want a output file of length 80 which will merge these header and detail recods and the output will be:

1111BBBBBBBBBBBBBBBBBBBBBBBBBBBB
1111CCCCCCCCCCCCCCCCCCCCCCCCC
1111DDDDDDDDDDDDDDDDDDDDDDDDD
2222EEEEEEEEEEEEEEEEEEEEEEEEEEEE
2222FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
3333AAAAAAAAAAAAAAAAAAAAAAAAAAAA
3333SSSSSSSSSSSSSSSSSSSSSSSSSSSS

The header record data will be the first 4 bytes of detail records in output file.

Can I do it using Icetool? If yes, how?

Thanks,
Nandan
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Fri Aug 28, 2009 8:05 pm
Reply with quote

is it that header record will have 4 numeric always and detail will always have at least one char among the first 4 a non-numeric and 5th position will alays be a non-space.
Back to top
View user's profile Send private message
NandanPhalak

New User


Joined: 14 Apr 2009
Posts: 14
Location: India

PostPosted: Fri Aug 28, 2009 8:57 pm
Reply with quote

The header record will always have numeric and 5 position will be space.
For detail record, its not necessary to be character.

Thanks,
Nandan
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Fri Aug 28, 2009 9:41 pm
Reply with quote

NandanPhalak,

Use the following DFSORT JCL

Code:

//STEP0100 EXEC PGM=SORT                                   
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD *                                             
1111                                                       
BBBBBBBBBBBBBBBBBBBBBBBBBBBB (DETAIL RECORDS)               
CCCCCCCCCCCCCCCCCCCCCCCCC                                   
DDDDDDDDDDDDDDDDDDDDDDDDD                                   
2222                                                       
EEEEEEEEEEEEEEEEEEEEEEEEEEEE                               
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF                           
3333                                                       
AAAAAAAAAAAAAAAAAAAAAAAAAAAA                               
SSSSSSSSSSSSSSSSSSSSSSSSSSSS                               
//SORTOUT  DD SYSOUT=*                                     
//SYSIN    DD *                                             
  SORT FIELDS=COPY                                         
  INREC IFTHEN=(WHEN=INIT,BUILD=(5:1,80)),                 
  IFTHEN=(WHEN=GROUP,BEGIN=(10,1,CH,EQ,C' '),PUSH=(1:5,4)) 
  OUTFIL OMIT=(10,1,CH,EQ,C' ')                             
/*                     
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

 


Similar Topics
Topic Forum Replies
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts ICETOOL to Read records SMF CEF it is... DFSORT/ICETOOL 4
Search our Forums:

Back to Top