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

Combining Files using DFSORT


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

New User


Joined: 21 Nov 2006
Posts: 50
Location: India

PostPosted: Wed Feb 13, 2008 8:54 am
Reply with quote

The first file will have one record and the content vary each time.The Second file will have records and the record position in this need to be changed.

File 1:
sssssssss

File 2:
123456789
abcdefghij

o/p File:
sssssssss
123 456 789
abc def ghij

In the o/p file the records in the second file need to be given a space.
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Wed Feb 13, 2008 9:12 am
Reply with quote

hi ksathishkumar83,

Quote:
In the o/p file the records in the second file need to be given a space


Well is this space in between the records of second file is after every 3rd char. ?
Back to top
View user's profile Send private message
ksathishkumar83

New User


Joined: 21 Nov 2006
Posts: 50
Location: India

PostPosted: Wed Feb 13, 2008 9:16 am
Reply with quote

it is only for the first thre occurence,Remaining colums should be copied as it is.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Feb 13, 2008 10:04 pm
Reply with quote

You can use a DFSORT/ICETOOL job like the following to do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1 DD *
sssssssss
/*
//IN2 DD *
123456789
abcdefghij
/*
//***>>> USE MOD FOR THE //OUT DD DATA SET
//OUT DD DISP=(MOD,CATLG,DELETE),DSN=...  output file (FB/82)
//TOOLIN DD *
COPY FROM(IN1) TO(OUT) USING(CTL1)
COPY FROM(IN2) TO(OUT) USING(CTL2)
//CTL1CNTL DD *
  INREC OVERLAY=(82:X)
/*
//CTL2CNTL DD *
  INREC BUILD=(1,3,X,4,3,X,7,74)
/*
Back to top
View user's profile Send private message
ksathishkumar83

New User


Joined: 21 Nov 2006
Posts: 50
Location: India

PostPosted: Sat Feb 16, 2008 12:47 am
Reply with quote

hi,

i did by the below sort using ICETOOL

//Step1 EXEC ICETOOL
//inp1 dd *
ssssssssss
//inp2 dd *
1234567890918744
//temp dd dsn=&&temp,disp=(mod,pass,delete)
//out dd dsn=fileq
//toolin dd *
copy from(inp1) to (temp)
copy from(inp2) to(temp) using CTL1
copy from(temp) to (out)
//ctl1ctln dd *
outrec fields=(1:1,3,5:4,3,9:7.3.........)
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top