set head off
set feedback off
set verify off
set pagesize 0
set serveroutput on

Declare 
p_time_stamp number(10);
p_acct_count number(20);
p_original_count number(10);

  CURSOR curs_max_timestamp IS
    SELECT max(acct_time_stamp)
     FROM accounting;

begin
-- p_time_stamp := 1080345600;
open curs_max_timestamp;
 fetch curs_max_timestamp into p_time_stamp;
-- p_time_stamp := $TIME_STAMP;
p_time_stamp := p_time_stamp + 500;
open curs_acct_count;
-- zxzx insert test
fetch curs_acct_count into p_original_count;

p_acct_count :=0;
-- zxzx insert test
While ( p_acct_count <= 1500) LOOP

INSERT INTO NPMADMIN.ACCOUNTING ( ACCT_STATUS_TYPE, NAS_USER_NAME, NAS_IDENTIFIER, NAS_IP_ADDRESS,
ACCT_SESSION_ID, FRAMED_IP_ADDRESS, SERVICE_TYPE, FRAMED_PROTOCOL, MEDIUM_TYPE, NAS_PORT_TYPE,
NAS_PORT, NAS_PORT_ID, NAS_REAL_PORT, ACCT_DELAY_TIME, ACCT_SESSION_TIME, ACCT_TIME_STAMP,
RATE_LIMIT_RATE, RATE_LIMIT_BURST, POLICE_RATE, POLICE_BURST, FILTER_ID, FORWARD_POLICY,
HTTP_REDIRECT_PROFILE_NAME, CONTEXT_NAME, SESSION_TIMEOUT, IDLE_TIMEOUT, RB_DHCP_MAX_LEASES,
MULTICAST_SEND, MULTICAST_RECEIVE, MULTICAST_MAX_GROUPS, IGMP_PROFILE_NAME,
QOS_POLICING_POLICY_NAME, QOS_METERING_POLICY_NAME, QOS_PQ_POLICY_NAME, ATM_PROFILE_NAME, PPPOE_URL,
PPPOE_MOTM, PPPOE_IP_ROUTE, PPP_DNS_PRIMARY, PPP_DNS_SECONDARY, PPP_NBNS_PRIMARY,
PPP_NBNS_SECONDARY, ACCT_TERMINATE_CAUSE, SESSION_ERROR_MSG, ACCT_REASON, ACCT_INPUT_OCTETS_64,
ACCT_OUTPUT_OCTETS_64, ACCT_INPUT_PACKETS_64, ACCT_OUTPUT_PACKETS_64, ACCT_MCAST_INPUT_OCTETS_64,
ACCT_MCAST_OUTPUT_OCTETS_64, ACCT_MCAST_INPUT_PACKETS_64,
ACCT_MCAST_OUTPUT_PACKETS_64 ) VALUES ( 
'Start', 'joe', 'ser-1', '127.0.0.1', '0B00FFFF90000010-40647961', NULL, 'Outbound-User'
, NULL, 'DSL', 'Virtual', 201392128, '12/1 clips 20013', NULL, NULL, NULL, p_time_stamp
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'BASIC', NULL, NULL, 1, NULL, NULL, NULL
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); 

p_time_stamp := p_time_stamp + 30;

commit;
p_acct_count := p_acct_count + 1;

end loop;
end;
/
exit;