View previous topic :: View next topic
|
Author |
Message |
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Hi all,
I faced a new Problem so Could you guys please help me out.
I have an input file ( Named FILE1 ) where the LRECL = 200 and it has data Upto 190 and the Rest 10 fields are Spaces. The fields are separated by ";".
In the File1 I have a field whose length = x(6) which actully starts after 4 semicolons. So there is no fixed position of the field. Please find below the Sample Input File.
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
111;123456789012;111111111;000000;sanjeet;102;sa;
222;;;333333333;222222;Sambhu;123;sa;
333;;;555555555;444444;Saam,1025;;
444;456789012345;444444444;333333;Sampath;20;mp;
555;234567890123;222222222;111111;Sankar;101;ra;
|
I have one more file ( Named FILE2 ) whose LRECL = 80. That contains only two fields which has been separated by ";".
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7
111111111;123456789
444444444;456789012
222222222;234567890
555555555;567890123
333333333;345678901
|
So I need to replace the X(06) field with the new value i.e x(09) when the value present after the three ";" in FILE1 = The first field of File2.
After replacing with the length=6 to length=9 the remaining fields should come as it is .
So the output need to come as follows,
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
111;123456789012;111111111;123456789;sanjeet;102;sa;
222;;;333333333;345678901;Sambhu;123;sa;
333;;;555555555;567890123;Saam,1025;;
444;456789012345;444444444;456789012;Sampath;20;mp;
555;234567890123;222222222;234567890;Sankar;101;ra;
|
Moreover the FILE1 Contains one HEADER RECORD and two TRAILER. That is not present in FILE2 but the resultant output should contain the Header and Trailer. |
|
Back to top |
|
|
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Hi all,
Can it be done by any other means ???
Like by using the ICETOOL ??? |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Siva,
Which version of SyncSort are you running? |
|
Back to top |
|
|
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Hi Arun,
Neither I am having any Idea about that nor i know hw to check ???
If Possible please guide me hw to chk that. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Hi Siva,
You can see at first line like below when you open SYSOUT of your SORT step.
Code: |
SYNCSORT FOR Z/OS 2.3.1.0NI |
In that, if you see WER messages, you've SYNCSORT installed in.
Or if messages are with ICE, DFSORT is installed in. |
|
Back to top |
|
|
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Hi Gnanas,
Thanks for the Info.
My system is having Syncsort.
Code: |
SYNCSORT FOR Z/OS 1.3.1.0N |
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Siva,
I believe it's possible using a PARSE/JOIN application. I am back at my SyncSort 1.2 shop; so I cant run a test now.
1. PARSE the fields by ';' to bring the fields to fixed positions
2. JOIN the above file to your second file to replace the values.
3. Left justify the resultant file after inserting back the ';'. |
|
Back to top |
|
|
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Hi Arun,
Thanks for the idea that u gave.
I ll go through the SYNCSORT document and ll try to get the output as u adviced. |
|
Back to top |
|
|
Brian Wood
New User
Joined: 12 Feb 2009 Posts: 2 Location: United States
|
|
|
|
Siva: If you require further assistance with this, please contact me at zos_tech@syncsort.com. |
|
Back to top |
|
|
|