IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

omiting data writtern into saslog


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Thu Aug 20, 2009 7:58 am
Reply with quote

Here is the SAS code I use

Code:
DATA _NULL_;                                 
     RETAIN CNT3 0;                           
     SET CLMEXP;                             
     BY KEYVALUE;                             
     IF FIRST.KEYVALUE THEN CNT3=0;           
     CNT3=CNT3+1;                             
      IF LAST.KEYVALUE THEN                   
         FILE OUTEXP;                         
         FORMAT CNT3 ZD10.;                   
         PUT   @1    CLAIM                   
               @4991 CNT3                     


While running data is getting writtern into the SASLOG is there any way to avoid this.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Aug 20, 2009 8:11 am
Reply with quote

Hello,

Is any diagnostic or informational info generated - maybe saying something like dd statement missing?

It may help if you post the jcl used for this execution.
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Thu Aug 20, 2009 8:29 am
Reply with quote

Here is the JCL. And no there are error or warning messages. All DD satements are provided. Actually the data is getting written into the PS file as expected, but the same data is getting writtern into the saslog also. The i/p will be quite big and if the o/p gets writtern into the saslog it will cause space issues for saslog.
Code:

//IPHSAS01 EXEC SAS,                                                 
//            WORK='400,100'                                         
//*******************************************************************
//INFILE   DD DSN=DETN.USDR.ESI.ML.INP,                             
//            DISP=SHR                                               
//OUTPER   DD DSN=DETN.USDR.ESI.MLRUL.PER,                           
//            DISP=(OLD,CATLG,CATLG),                               
//            UNIT=TESTDA,VOL=(,,,99),                               
//            SPACE=(CYL,(1,1),RLSE),                               
//            DCB=(MDLDSCB,RECFM=FB,LRECL=5000,BLKSIZE=0)           
//OUTFLT   DD DSN=DETN.USDR.ESI.MLRUL.FLT,                           
//            DISP=(OLD,CATLG,CATLG),                               
//            UNIT=TESTDA,VOL=(,,,99),                               
//            SPACE=(CYL,(1,1),RLSE),                               
//            DCB=(MDLDSCB,RECFM=FB,LRECL=5000,BLKSIZE=0)           
//OUTEXP   DD DSN=DETN.USDR.ESI.MLRUL.EXP,                           
//            DISP=(OLD,CATLG,CATLG),                               
//            UNIT=TESTDA,VOL=(,,,99),                               
//            SPACE=(CYL,(1,1),RLSE),                               
//            DCB=(MDLDSCB,RECFM=FB,LRECL=5000,BLKSIZE=0)           
//CPYRSNFL DD DSN=DETN.USDR.ESI.MLRUL.CPYRSNFL,                     
//            DISP=(OLD,CATLG,CATLG),                               
//            UNIT=TESTDA,VOL=(,,,99),                             
//            SPACE=(CYL,(1,1),RLSE),                               
//            DCB=(MDLDSCB,RECFM=FB,LRECL=5000,BLKSIZE=0)           
//SYSIN    DD *                                                     
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Thu Aug 20, 2009 8:40 am
Reply with quote

Thanks Dick,

I fixed the error.

Here is my new code.
Code:

DATA _NULL_;                                     
     RETAIN CNT3 0;                               
     SET CLMEXP;                                 
     BY KEYVALUE;                                 
     IF FIRST.KEYVALUE THEN CNT3=0;               
     CNT3=CNT3+1;                                 
      IF LAST.KEYVALUE THEN DO;                   
         FILE OUTEXP;                             
         FORMAT CNT3 ZD10.;                       
         PUT   @1    CLAIM                       
               @4991 CNT3                         
         ;                                       
      END;                                       
 RUN;                                             


icon_idea.gif I think this was a programming logic error after the
Code:
  IF LAST.KEYVALUE THEN
the DO was missing which caused the FILE statement to be executed alone and after that when PUT statement was executed the data was writtern into log instead of PS file in FILE statement.

I lost about 2 Hrs fixing such a blunder icon_cry.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Aug 20, 2009 8:46 am
Reply with quote

Hello,

Is there anything of value in the saslog? Is it difficult to rerun this if there is a problem? Might it be possible to simply dummy the saslog and only create it on a rerun if needed?

Suggest you change the disp= and not use (old,catlg,catlg). DISP=OLD should be all that you need. . .
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Fri Aug 21, 2009 7:48 am
Reply with quote

BTW - You can say
Code:
CNT3+1;
in SAS, and for variables incremented like this retain is automatic, although I like an explicit retain anyway for clarity..

A nice syntax.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Aug 21, 2009 2:19 pm
Reply with quote

Welcome back Phrzby... icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top