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
 

 

Using the SPLICE option in ICETOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Using the SPLICE option in ICETOOL
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 Moderator


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

PostPosted: Sat Sep 23, 2006 1:42 am    Post subject:
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    Post subject: Re: Using the SPLICE option in ICETOOL
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 Moderator


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

PostPosted: Mon Sep 25, 2006 10:36 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm


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