View previous topic :: View next topic
|
Author |
Message |
ksathishkumar83
New User
Joined: 21 Nov 2006 Posts: 50 Location: India
|
|
|
|
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 |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
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 |
|
|
ksathishkumar83
New User
Joined: 21 Nov 2006 Posts: 50 Location: India
|
|
|
|
it is only for the first thre occurence,Remaining colums should be copied as it is. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
ksathishkumar83
New User
Joined: 21 Nov 2006 Posts: 50 Location: India
|
|
|
|
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 |
|
|
|