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

Using the SPLICE option in ICETOOL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rockw83

New User


Joined: 19 Sep 2006
Posts: 4
Location: Milwaukee Wi

PostPosted: Sat Sep 23, 2006 1:03 am
Reply with quote

I am new to using ICETOOL and I am having trouble getting the results I need. I have looked over the manuals and checked several examples and have acheived limited success.

I am trying to splice two files together. The common field is the PO field that is (6,19) in both files. One file is a header file and the other is the item file. there is one header record to many item records. I need to take the header file and combine it with 5 fields from the item file.

When I execute the code the ALLRCDS DD only has header data and non of the item records. the record length of both files is 200. The ALLRECDS remains at 200 after execution. I tried to define the new record length in the ALLRCDS DD, but only got NULL values in the 201 - 253 positions.

How can I splice the 5 item records to the header?

Code:
                                                 
//STEP010  EXEC PGM=ICETOOL                           
//TOOLMSG  DD SYSOUT=*                                 
//DFSMSG   DD SYSOUT=*                                 
//IN1      DD DSN=FS.FSDAD52.ZMRGEN1.POHEAD,DISP=SHR   
//IN2      DD DSN=FS.FSDAD52.ZMRGEN2.POITEM,DISP=SHR   
//TMP1     DD DSN=&&TEMP1,DISP=(MOD,PASS,),UNIT=SYSDA,
//             SPACE=(CYL,(025,050),RLSE)             
//ALLRCDS  DD DSN=FS.FSDAD52.ZMRGEN2.POCMBN,               
//             DISP=(,CATLG,DELETE),                       
//             SPACE=(CYL,(025,050),RLSE),                 
//             DCB=(RECFM=FB,LRECL=253,BLKSIZE=0)           
//TOOLIN   DD *                                             
 COPY FROM(IN1) TO(TMP1) USING(CPY1)                       
 COPY FROM(IN2) TO(TMP1) USING(CPY2)                       
 SPLICE FROM(TMP1) TO(ALLRCDS) USING(CPY2) ON(6,19,CH) -   
        WITHEACH WITH(34,19) WITH(192,10) WITH(214,8) -     
                         WITH(223,8) WITH(323,08)
/*                                                         
//CPY1CNTL DD DSN=FS.FSDAD52.ZMRGEN2.COPY1,                 
//             DISP=(,CATLG,DELETE),                       
//             SPACE=(CYL,(025,050),RLSE)                   
//CPY2CNTL DD DSN=FS.FSDAD52.ZMRGEN2.COPY2,   
//             DISP=(,CATLG,DELETE),       
//             SPACE=(CYL,(025,050),RLSE)
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: Sat Sep 23, 2006 1:42 am
Reply with quote

You need to supply more information.

Most important, show an example of the records in each input file and what you expect for output (you can just show the relevant fields with dots in between them).

Show the control statements you're using for CPY1CNTL and CPY2CNTL.

My first guess would be that you want WITHALL instead of WITHEACH but I couldn't say for sure without the above information. You would use WITHEACH if there are five different item records, each with one field that you want. You would use WITHALL if every record has the five items you want.

In addition, you seem to be trying to use CPY2CNTL for the second COPY operator and the SPLICE operator. I don't think you really want to do that.

Also, you should remove the DCB attributes from the ALLRCDS DD. You need to have the job set up correctly so that the record length is automatically set to 253; otherwise you will get an error message. Again, once you give me the information I asked for, I can tell you how to set it up correctly.
Back to top
View user's profile Send private message
Rockw83

New User


Joined: 19 Sep 2006
Posts: 4
Location: Milwaukee Wi

PostPosted: Mon Sep 25, 2006 8:18 pm
Reply with quote

Frank,

Thanks for the quick response.....

Here are is the example of the records in each input file and what I need for output The file shows a sample header and multiple Items, with a final output file. (See Attachment)

I don not have control statements for CPY1CNTL and CPY2CNTL. I basically used an example I found on the IBM web site to create a shell of what I need.

I have enclosed the complete JCL.

//STEP010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=FS.FSDAD52.ZMRGEN1.POHEAD,DISP=SHR
//IN2 DD DSN=FS.FSDAD52.ZMRGEN2.POITEM,DISP=SHR
//TMP1 DD DSN=&&TEMP1,DISP=(MOD,PASS,),UNIT=SYSDA,
// SPACE=(CYL,(025,050),RLSE)
//ALLRCDS DD DSN=FS.FSDAD52.ZMRGEN2.POCMBN,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(025,050),RLSE)
//TOOLIN DD *
COPY FROM(IN1) TO(TMP1) USING(CPY1)
COPY FROM(IN2) TO(TMP1) USING(CPY2)
SPLICE FROM(TMP1) TO(ALLRCDS) USING(CPY2) ON(6,19,CH) -
WITH(34,19) WITH(192,10) WITH(214,8) -
WITH(223,8) WITH(323,08)
//* USING(CTL1)
/*
//CPY1CNTL DD DSN=FS.FSDAD52.ZMRGEN2.COPY1,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(025,050),RLSE)
//CPY2CNTL DD DSN=FS.FSDAD52.ZMRGEN2.COPY2,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(025,050),RLSE)
/*
**************************** Bottom of Data ********
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: Mon Sep 25, 2006 10:36 pm
Reply with quote

Quote:
Here are is the example of the records in each input file and what I need for output The file shows a sample header and multiple Items, with a final output file. (See Attachment)


Well, I downloaded your icetool.doc file and it appeared to be a copy of your post. I couldn't find the input records or output records you mentioned - just the JCL which doesn't tell me anything.

Quote:
I don not have control statements for CPY1CNTL and CPY2CNTL. I basically used an example I found on the IBM web site to create a shell of what I need.


Huh? Did you really expect it to work without the control statements in CPY1CNTL and CPY2CNTL? If you found something on the DFSORT website then it would certainly have the controls statements. And I'm sure it didn't have USING(CPY2) for both the second COPY operator and the SPLICE operator.

If you want my help, I need to see your input and output records. Try sending them to me directly via e-mail (yaeger@us.ibm.com). Put "DFSORT" somewhere in your Subject line to catch my attention.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts SCOPE PENDING option -check data DB2 2
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
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
Search our Forums:

Back to Top