Splitting the Numbers alone from a given variable
Posted: Tue Sep 13, 2011 5:51 am
I have a task in which we have to spilt the Variable into two .
The length of the address 2 variable is X(32)
in this case its starting position is 42 .
i have an input file which looks like this
I have to spilt the Address line 2 into two . say that the numbers in the adress line 2 represents pincode. I have to spilt that from the above scenario and should be displayed after two blanks.
The desired output will look like this
I tried in cobol by calculating the length of the variable and using inspect just want to know is there a way to figure this out in DFSORT or SYNCSORT.
Thanks in advance.
Karthik. G
The length of the address 2 variable is X(32)
in this case its starting position is 42 .
i have an input file which looks like this
Code: Select all
Account number address line 1 address line 2
123456789 velan nagar chennai12345
123456453 mahalakshmi st delhi5678
012345653 brindhavan nagar mumbai45678
I have to spilt the Address line 2 into two . say that the numbers in the adress line 2 represents pincode. I have to spilt that from the above scenario and should be displayed after two blanks.
The desired output will look like this
Code: Select all
Account number address line 1 address line 2
123456789 veloan nagar chennai 12345
123456453 mahalakshmi st delhi 5678
012345653 brindhavan nagar mumbai 45678
Thanks in advance.
Karthik. G