cut and paste using awk

Hi i need a favour
i have a file which has some trillions of records. The file is like this
11111000000000192831840914000000000000000000000000000
45789899090000000000000000011111111111111111111111111

I want to cut specific postions in each line like cut1-3 and assisgn it to a variable and redirect it to another file, then cut 4-6 assign it to variable and agn redirect, like this to the whole and i dnt want to use while loop..is there a better way to do it, may be cutting at multiple postions using awk.
Please help

You can do something like this:

awk '{
  print substr($0,1,3 > "file1"
  print substr($0,4,2 > "file2"
}' file

I remember seeing this post...but that thread was closed.

When you assign to variable, will the variable be same each time??
And when you redirect to another file, that another file will have each record in a new line??

One more thing, if you have huge file, using awk may not be the best way.

No the variable is different..Like
a=cut 1-3
b=cut4-6 and so on from the first line ..likethis

The another file will have it like this
ab for line 1
ab corressponding to line 2
and so on
and yes its a very huge file and can you please suggest and alternative to it

while read line
do
...
done < file

is the fastest way to read a file, i think. But since you are avoiding 'while', your options are limited to awk, cut, sed etc.

awk '{for(i=0;i<18;i++){file=NR OFS i;print substr($0,(i*3+1),3) > file; close(file)}}' OFS="_" infile

This solution will split your huge file into multiple files.