Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

omiting data writtern into saslog

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: omiting data writtern into saslog
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

Site Director


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

PostPosted: Thu Aug 20, 2009 8:11 am    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Aug 20, 2009 8:46 am    Post subject:
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

Active Member


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

PostPosted: Fri Aug 21, 2009 7:48 am    Post subject:
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

Senior Member


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

PostPosted: Fri Aug 21, 2009 2:19 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us