function READALLSV2,date,ecs=ecs
;+
; NAME:
;	READALLSV2
;
; PURPOSE:
;	This routine reads in all service module housekeeping packets type 2,
;	(SVMHK2) for a given date.
;
; CATEGORY:
;	LASCO PACKETS
;
; CALLING SEQUENCE:
;	Result = READALLSV2 ( Date )
;
; INPUTS:
;	Date:	A string specifying the date in the format YYMMDD
;
; KEYWORD PARAMETERS:
;	ECS:	This keyword will indicate that the file type to be read in
;		are files generated by the EOF Core System (ECS).  If the
;		keyword is not present, the routine assumes the files were
;		generated by DACS.
;
; OUTPUTS:
;	This function returns the SVMHK2 housekeeping data as a 2D byte array
;	in which the packet information is the first dimension and time is
;	the second dimension.
;
; COMMON BLOCKS:
;	None
;
; RESTRICTIONS:
;       If the environment variable, TMPCKTS, is not defined then the current
;       working directory must be the directory where the files are located.
;
; PROCEDURE:
;	Calls the routines READ_TM_PACKET, GET_PACKET_FNAMES and READ_PACKET_FNAMES
;
; EXAMPLE:
;	Read in the ECS housekeeping data for the date 6 March 1996:
;
;		hk = READALLSV2 ('960306',/ecs)
;
; MODIFICATION HISTORY:
; 	Written by:	R.A. Howard, 1992
;	Jan, 1996	Modified for ECS and READ_TM_PACKET.
;       Sep, 1998       Added environment variable TMPCKTS
;       Sep 24, 1998	Use GET_PACKET_FNAMES and READ_PACKET_FNAMES
;
; @(#)readallsv2.pro	1.3 09/24/98 :LASCO IDL LIBRARY
;
;-
IF (KEYWORD_SET(ecs)) THEN fname='SVMHK2_'+date ELSE fname='SVHK2'+date
fnames = GET_PACKET_FNAMES(fname)
pckts = READ_PACKET_FNAMES(fnames)
RETURN,pckts
END


