View previous topic :: View next topic
|
Author |
Message |
vaibhavjadhav
New User
Joined: 27 Jul 2007 Posts: 33 Location: mumbai
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
vaibhavjadhav
New User
Joined: 27 Jul 2007 Posts: 33 Location: mumbai
|
|
|
|
Yes Vasanth you are correct. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|