User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Computer Science and Software Design section within the Software Development category of DaniWeb, a massive community of 397,772 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,541 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Computer Science and Software Design advertiser:
Views: 2153 | Replies: 0
Reply
Join Date: Jun 2005
Posts: 1
Reputation: Celticneo is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Celticneo Celticneo is offline Offline
Newbie Poster

Help on SAS code

  #1  
Jun 13th, 2005
Hi,
I am a new member. I am having problem with a SAS code i have encountered and cant understand what is wrong with it. The problem is that it is populating the date wrongly. Below is the SAS code i have included in my JCL.
//SASTEP02 EXEC SAS
//INPUT1 DD DSN=TRIMCARP.OUTPUT(+1),DISP=SHR
//OUTPUT1 DD DSN=foreign.file.TXXXX,DISP=(MOD,CATLG),
// SPACE=(TRK,(150,50),RLSE),UNIT=DISK,LRECL=80,
// BLKSIZE=0,RECFM=FB
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DATA EXTRACT;
INFILE INPUT1 LENGTH=LEN MISSOVER;
INPUT @4 VOLS $6.
@13 JDAT $8.
@27 HH $2.
@29 MM $2.
@34 ACCT$8.;
PDAT = COMPRESS(JDAT,'/');
SELDAT = DATEJUL(PDAT);
SS = '00';

IF SELDAT = TODAY()-1 THEN OUTPUT;
ELSE DELETE;
KEEP VOLS JDAT PDAT SELDAT HH MM SS ACCT;
PROC PRINT;
DATA EXTRACT;
SET EXTRACT;
CDATE = TODAY();
LECCODES = 'XXXXXXX';
CTIME = TIME();
IF VOLS GT '5F2999' THEN TAPE = 'RFN';
ELSE TAPE = 'CFN';
FILE OUTPUT1 NOTITLES;
PUT @1 VOLS @7 LECCODES @14 TAPE @19 HH @21 MM @23 SS
@25 CDATE YYMMDD6. @32 ACCT;
/*

Why is it populating a wrong date?????? This problem also occurs randomly. The rest of the days it populates the date perfecly.
Do hope someone can help out
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Computer Science and Software Design Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Computer Science and Software Design Forum

All times are GMT -4. The time now is 4:32 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC