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

SAS o/p file, the third row is not getting displayed


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shamsundar_mk

New User


Joined: 18 May 2007
Posts: 30
Location: CHENNAI

PostPosted: Tue May 13, 2008 3:43 pm
Reply with quote

I have coded a SAS pgm as follows:

DATA WORK;
INFILE IN;
FILE OUT1;
INPUT @1 INF $CHAR76.;
PUT @1 INF $CHAR76.;
RUN;

the i/p file has following data:

(col 1-80)
AAA this is test...............................................................
AAA this is not test............................................................
CCC
BBB this is test...............................................................
BBB this is not test............................................................

The third row in input file has data only from col 1-3.

the o/p given by the sas pgm is as follows which is incorrect:

AAA this is test...............................................................
AAA this is not test............................................................
BBB this is test...............................................................
BBB this is not test............................................................

In the o/p file, the third row is not getting displayed.
Could you please help me.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


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

PostPosted: Tue May 13, 2008 5:40 pm
Reply with quote

Works for me - please post your SASlog as code.

Code:
DATA WORK;           
INFILE IN;           
FILE OUT1;           
INPUT @1 INF $CHAR76.;
PUT @1 INF $CHAR76.; 
RUN;                 


Code:
AAA THIS IS TEST..........................
AAA THIS IS NOT TEST......................
CCC                                       
BBB THIS IS TEST..........................
BBB THIS IS NOT TEST                     
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 13, 2008 5:45 pm
Reply with quote

Works fine on my system ................... cut & pasted your code and got
Code:

AAA TEST   
AAA NO TEST
CCC       
BBB TEST   
BBB NOTEST
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed May 14, 2008 4:22 am
Reply with quote

Hi,

maybe he just can't C it (sorry it's just my warped sense of humour).


Gerry
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 14, 2008 11:46 am
Reply with quote

gcicchet wrote:
Hi,

maybe he just can't C it (sorry it's just my warped sense of humour).


Gerry


Well, it brought a smile to my face icon_smile.gif
Back to top
View user's profile Send private message
Alan Voss

New User


Joined: 29 Nov 2006
Posts: 32
Location: Jacksonville, FL

PostPosted: Wed Jun 04, 2008 10:38 pm
Reply with quote

If you are reading a variable blocked record, you will not, by default get the third line because the record is not 76 bytes long. Change your infile statement to:
Code:

INFILE IN truncover;

and I am pretty certain that your problem will go away (default, I believe) is SKIPOVER.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 05, 2008 1:05 pm
Reply with quote

If only the OP had mentioned the possibility of a VB file

Good spot Alan
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top