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

SAS to ICETOOL conversion.


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

New User


Joined: 27 Jul 2007
Posts: 33
Location: mumbai

PostPosted: Wed Jun 15, 2011 10:46 am
Reply with quote

Hi,

In my project requirement I have to convert the below SAS code to ICETOOL code.
Could you please help me on this?

SAS code:
DATA<O/P FILE>;
MERGE<I/P FILE-1> (IN=in_b) <I/P FILE-2>;
BY POL_NO --> this is first 9 bytes in both the input files.
IF in_b;
RUN;

Note: this merge writes the matching records from both the input files and non-matching records from the I/P FILE-1.

Please help me with this issue also do let me know if you have any concerns.

Vaibhav.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Jun 15, 2011 11:05 am
Reply with quote

Hello,
As you maybe aware that a SAS dataset is almost similar to a SQL table,
The code which you have shown produces a SAS dataset as output, whereas ICETOOL cannot produce SAS dataset as output.

are you planning to write both the sas datasets into external file and then merge using SORT(ICETOOL)?
Back to top
View user's profile Send private message
vaibhavjadhav

New User


Joined: 27 Jul 2007
Posts: 33
Location: mumbai

PostPosted: Wed Jun 15, 2011 2:27 pm
Reply with quote

Yes Vasanth you are correct.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Jun 15, 2011 4:18 pm
Reply with quote

Hello,
I guess you are looking for SPLICE using ICETOOL, try if this example suits ur requirement
ibmmainframes.com/post-42612.html

if no, provide more information of how the two sas datasets get created,
is there any processing done while creating the two SAS datasets?
what is the input statement used? (to understand the layout of the file)
what would be the put statement used to write the SAS datsets into external files?
More relevant information will be useful.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Jun 15, 2011 10:42 pm
Reply with quote

Vaibhav.

If you're looking for a DFSORT solution (or a DFSORT/ICETOOL solution), you could use DFSORT's JOINKEYS function. For complete details on JOINKEYS, see:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174

If you want more specific help to do this with DFSORT, please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.

Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DUMMY
//SYSIN    DD    *
    OPTION COPY
/*
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 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top