surezznag
New User
Joined: 04 Aug 2023 Posts: 6 Location: India
|
|
|
|
Hi,
Good day!
I have requirement to find how many records in VB file and Sum for one numeric field (ex: Field name is Amount). VB file has delimiter of pipe '|' between each record.
I can able to calculate count using trailer1 variable like below,
OPTION COPY
OUTFIL NAMES=SORTOUT,REMOVECC,NODETAIL,
TRAILER1=(1:COUNT=(EDIT=IIIIIIIIIT))
For Sum, field position is 5 and since it is VB file and values are not placed in fixed position for each field.
Ex: XXXX|XXXX|XXXX|XXXX|OOOO
where OOOO is amount
Please anyone suggest me how to calculate sum for amount field which is 5th field in VB file. |
|