LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 1998, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 16 Mar 1998 10:42:34 -0500
Reply-To:     Michael Stuart <mstuart@PRUDENTIAL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Michael Stuart <mstuart@PRUDENTIAL.COM>
Subject:      MVS & Missing Files -- Solved
Content-Type: multipart/mixed;
              Boundary="0__=qt0095oKgZly8y2V7qS5CceBgyRJTfbDTibOC5deuSUyrUa0e13ery3M"

Thanks again for all the suggestions received from the group. The problem with FILEEXIST is a known problem in MVS 6.09 TS450 -- was corrected in TS455. Luckily I can access TS455 in test mode here. The code included below runs cleanly under TS455 -- even with missing files. ---------------------- Forwarded by Michael Stuart/M&P/Prudential on 03/16/98 10:37 AM --------------------------- Michael Stuart Thursday March 12, 1998 05:00 PM IIG Marketing Performance & Information (973) 802-4125 Fax Number: (973) 622-3156 (Embedded image moved to file: PIC27651.PCX) To: SAS-L@VTVM1.CC.VT.EDU cc: Subject: re:MVS & Missing Files

Thanks (Tim Berryhill and Ray Pass and Bernard Tremblay) for getting me started. I uncovered information on FILEEXIST to check if a file is out there, and started putting together a solution. Unfortunately ... every time I FILEEXIST a file that doesn't exist -- I get a system error -- kind of irksome if you consider the purpose of the function. The specific error I get is: "FATAL: Undetermined execution error detected in the execution of the data step program. Aborted during the EXECUTION phase."

I've tried various approaches to basically the same concept and it happens everytime time, when a non-existent file is FILEEXIST'd. It only happens in batch mode however, I've run some tests in interactive (using the same file names, etc.), and I get no errors. The code below runs cleanly if there are no missing files.

I've opened a ticket at SAS, but they didn't sound too enthusiastic about finding a quick reason/solution for the problem. In the meantime, has anyone else encountered this?

Any rate ... the solution that I was trying for was to use FILEEXIST to verify a file was out there, and if it was, load the full name of the dataset to a SAS file. After checking for all the files I want, use PROC SQL to create a comma/quote delimited macro variable of all the file names that do exist, and passing that to a FILENAME statement. Unfortunately, it's not getting past the first step ...

//OTCIP04 JOB (B,X,41RHMS),'IIG,STU',MSGCLASS=V,NOTIFY=&SYSUID,PRTY=09

//M1 OUTPUT DEST=PSHR1.&SYSUID

//*------------------------------------------------------------------

//SCRATCH EXEC PGM=IEXUNCAT

//SYSIN DD SUBSYS=(CCSS,

// ' BX41RH.X041979.OTCIP04.SASLIB ')

//*------------------------------------------------------------------

//SAS EXEC SAS

//SASLIST DD SYSOUT=*,OUTPUT=*.M1

//SASLOG DD SYSOUT=*,OUTPUT=*.M1

//MPRINT DD SYSOUT=*

//NLIB DD DSN=BX41RH.X041979.OTCIP04.SASLIB,

// UNIT=DASD,LABEL=RETPD=60,DISP=(,CATLG),

// DCB=(RECFM=FS,LRECL=28160,BLKSIZE=28160,DSORG=PS),

// SPACE=(28160,(5000,2500),RLSE)

//SYSIN DD *

OPTIONS ERRORS=1 MERROR SYMBOLGEN SERROR MLOGIC MPRINT RESERVEDB1 ;

%MACRO LOADOTC(CYCLE) ;

DATA FLIST ;

%MACRO CHEKSTRM(STREAM) ;

IF FILEEXIST("BX41RH.OTCIP04.&STREAM..&CYCLE") THEN DO ;

FILE = "BX41RH.OTCIP04.&STREAM..&CYCLE" ; OUTPUT ; END ;

%MEND ;

%CHEKSTRM(CAMO) ;

%CHEKSTRM(MMO) ;

%CHEKSTRM(NEMO) ;

%CHEKSTRM(PPFS) ;

%CHEKSTRM(SCMO) ;

%CHEKSTRM(WMO) ;

PROC SQL ;

SELECT QUOTE(FILE) INTO :FLIST SEPARATED BY ',' FROM FLIST ;

%PUT _USER_ ;

FILENAME OTCIP (&FLIST) ;

DATA OTCIP ;

LENGTH DSCB $200 STREAM $4 CYCLE $6 ;

INFILE OTCIP DSCB=DSCB UNBUFFERED ;

INPUT @145 DOPOL $CHAR1.

@146 ROPOL $CHAR1.

@147 PCKPOL PD4.

@151 SFRMYR PD3.

@154 SFRMMO PD2.

@156 SFRMDY PD2.

@158 STOYR PD3.

@161 STOMO PD2.

@163 STODY PD2.

@171 POLYR PD3.

@174 POLMO PD2.

@176 POLDY PD2.

@3685 TABFUND PD6.2

@3691 DIFFUND PD6.2

@3697 ACMPREMD PD6.2

@3703 ACMPREMR PD6.2

@3709 PREMACCT PD6.2

@3786 RORLYR PD3.4

@3789 RORCDUR PD3.4 ;

POLICY = DOPOL || ROPOL || INPUT(PUT(PCKPOL,Z7.),$CHAR7.) ;

STFROMDT = MDY(SFRMMO,SFRMDY,SFRMYR) ;

STTODT = MDY(STOMO,STODY,STOYR) ;

POLDT = MDY(POLMO,POLDY,POLYR) ;

TEMP = TRANSLATE(SUBSTR(DSCB,INDEX(DSCB,'OTCIP04')+8,11),' ',',') ;

PTPOS = INDEX(TEMP,'.') ;

STREAM = SUBSTR(TEMP,1,PTPOS-1) ;

CYCLE = SUBSTR(TEMP,PTPOS+1,6) ;

DROP DOPOL ROPOL PCKPOL SFRMMO SFRMDY SFRMYR STOMO STODY STOYR

POLMO POLDY POLYR TEMP PTPOS ;

FORMAT STFROMDT STTODT POLDT MMDDYY10. ;

PROC APPEND DATA=WORK.OTCIP BASE=NLIB.OTCIP FORCE ;

PROC DATASETS LIBRARY=WORK ;

DELETE OTCIP ;

FILENAME OTCIP CLEAR ;

%MEND ;

%LOADOTC(D9809C) ;

%LOADOTC(D9809D) ;

%LOADOTC(D9809E) ;

%LOADOTC(D9807B) ;

TWB2%Rates%FAR@bangate.pge.com on 03/12/98 01:08:29 PM Thursday March 12, 1998 10:08 AM

Please respond to TWB2%Rates%FAR@bangate.pge.com To: mstuart@prudential.com SAS-L@UGA.CC.UGA.EDU cc: (bcc: Michael Stuart/M&P/Prudential) Subject: re:MVS & Missing Files

Michael, We face a similar problem here. Our solution uses PROC IDCAMS, but just for flash--it should have been a two step job instead. Anyway, the outline is to run a first (non-SAS) step which lists catalog entries matching your pattern to a flat file, then run a SAS step which parses the file to locate available entries. If you also maintain a history of previously processed entries you can exclude anything in history from current processing. Our solution accepts a list of new files to ignore and a list of old files to reprocess. Once you have the list of files to process you can either read them in using the FILEVAR option of the INFILE statement or use CALL EXECUTE to write FILENAME statements. Tim Berryhill - Contract Programmer and General Wizard TWB2@PGE.COM or http://www.aartwolf.com/twb.html Frequently at Pacific Gas & Electric Co., San Francisco The correlation coefficient between their views and my postings is slightly less than 0 ----------------------[Reply - Original Message]---------------------- Sent by:"Michael Stuart" <mstuart@PRUDENTIAL.COM> Greetings. I'm developing a production process on MVS (SAS v6.09 TS450) to read data from daily regional files, and load to a SAS dataset for analysis and reporting. One of the problems that I'm running into is that occasionally a file from one of the six regions may not be created.<SNIP> I'm also interested in hearing comments on how I can prevent a particular cycle from being loaded twice.<SNIP>


PIC27651.PCX [application/octet-stream]


Back to: Top of message | Previous page | Main SAS-L page