View previous topic :: View next topic
|
Author |
Message |
bodatrinadh
Active User
Joined: 05 Jan 2007 Posts: 101 Location: chennai (India)
|
|
|
|
Hi,
Here is my requirement. Input file is FB and Rec Length=80.
Input file:-
AAA; 1;A2 ; 13.2
AAA;25;A ; 2.0
AAA; 3;A35 ;521.3
AAA; 4;A999; 51.7
My output file should be in
Output file:-
AAA;1;A2;13.2
AAA;25;A;2.0
AAA;3;A35;521.5
AAA;4;A999;51.7
Please Advise
Thanks
Trinadh |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
You could use Change all command,
What SORT product do you have?
If its DFSORT you could use,
Code: |
//JS020 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DISP=OLD,DSN=WELLS.SORTIN <- Input file
//IN2 DD DISP=OLD,DSN=WELLS.SORTOUT <- Output file
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(IN2) USING(CTL1)
//CTL1CNTL DD *
INREC FINDREP=(IN=C' ',OUT=C'')
/* |
Hope it helps. |
|
Back to top |
|
|
bodatrinadh
Active User
Joined: 05 Jan 2007 Posts: 101 Location: chennai (India)
|
|
|
|
Thanks Vasanth, i got the required output.
Regards
Trinadh |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
You could search for "smart DFSORT tricks" pdf document which has many useful programs like this and its a good tutorial. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
You can also use PGM=SORT with
Code: |
//SYSIN DD *
OPTION COPY
INREC FINDREP=(IN=C' ',OUT=C'')
/ |
|
|
Back to top |
|
|
|