Subversion Repositories wimsdev

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14104 guerimand 1
!!
2
!! move a field of a record to another position
3
!!
4
!! needed information :
5
!! target_field : the position where the field be inserted after (next are translated).
6
!! source_field : the position of the source field
7
!! wims_read_parm : name of record
8
 
9
ecnt_=!recordcnt $wims_read_parm
10
!for e_=1 to $ecnt_
11
  field_$e_=!record $e_ of $wims_read_parm
12
!next e_
13
list_=!values v for v=1 to $ecnt_
14
list_=!replace item number $source_field by $empty in $list_
15
list_=!replace item $target_field by $target_field,$source_field in $list_
16
list_=!nonempty item $list_
17
!writefile $wims_read_parm :$(field_$(list_[1]))
18
!for e_=2 to $ecnt_
19
  !appendfile $wims_read_parm :$(field_$(list_[$e_]))
20
!next e_