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
 

 

Retain Overlay record in Splice

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Sathish Gurumoorthy

New User


Joined: 12 Feb 2009
Posts: 33
Location: Chennai, India

PostPosted: Tue Jul 13, 2010 8:25 pm    Post subject: Retain Overlay record in Splice
Reply with quote

Hi,

I have an input file of length 80 & recfm = FB like below.

Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7
PROD1 FIGARO FIG0 PPS716     COBOLFIG P COBOLACD G974616 01 01
PROD1 FIGARO FIG0 PPS740     COBOLFIG P COBOLACD G470203 01 10
PROD1 FIGARO FIG0 PPS741     COBOLFIG P COBOLACD         01 01
PROD1 FIGARO FIG0 PPS742     COBOLFIG P COBOLACD         01 02
PROD1 FIGARO FIG0 PPS745     COBOLFIG P COBOLACD         01 00
PROD1 FIGARO FIG0 PPS746     COBOLFIG P COBOLACD G974650 01 01


DEVF1 FIGARO FIG1 PSS716     COBOLFIG E COBOLOCD G270214 01     00
DEVF1 FIGARO FIG1 PSS742     COBOLFIG E COBOLOCD G973013 01     00
DEVF1 FIGARO FIG1 PSS746     COBOLFIG E COBOLOCD         01     00


When i use below splice, i get the below output file which has length 80 & FB.

Code:
SPLICE FROM(IN) TO(OUT) ON(19,10) ON(30,8) -
WITHANY WITH(1,5) WITH(7,6) WITH(14,4) WITH(39,1) WITH(41,8) WITH(50,7) WITH(61,2) WITH(65,2)


Output file
----+----1----+----2----+----3----+----4----+----5----+----6----+----7
DEVF1 FIGARO FIG1 PSS716     COBOLFIG E COBOLOCD G270214 01 01  00
DEVF1 FIGARO FIG1 PSS742     COBOLFIG E COBOLOCD G973013 01 02  00
DEVF1 FIGARO FIG1 PSS746     COBOLFIG E COBOLOCD G974650 01 01  00


But i want the output file as below. When Overlay record(DEVF1) in position 50 to 57 is spaces, the base record gets overlayed.

Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7
DEVF1 FIGARO FIG1 PSS716     COBOLFIG E COBOLOCD G270214 01 01  00
DEVF1 FIGARO FIG1 PSS742     COBOLFIG E COBOLOCD G973013 01 02  00
DEVF1 FIGARO FIG1 PSS746     COBOLFIG E COBOLOCD         01 01  00


look 3rd record in positions 50 to 57 in expected output file.

If WITH field in overlay record is spaces, then WITH field from base record is written into output file. I want WITH field from overlay record to be written.

I want all the fields from overlay records (DEVF1 records) except ON fields

Regards,
Sathish.
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: Tue Jul 13, 2010 11:05 pm    Post subject:
Reply with quote

You need to do a better job of explaining what you want to do.

When do you want a field from the base record and when do you want a field from the overlay record. What about these cases:

1) field in base record and overlay record are nonblank
2) field in base record is blank and field in overlay record is nonblank
3) field in base record is nonblank and field in overlay record is blank

Which cases apply to which fields? Is it just the field in 50-57 that you want to handle in a special way or all of the WITH fields?

Please show a better example of input and expected output with all of the possible cases you want to handle. Explain the rules for getting from input to output.
Back to top
View user's profile Send private message
Sathish Gurumoorthy

New User


Joined: 12 Feb 2009
Posts: 33
Location: Chennai, India

PostPosted: Wed Jul 14, 2010 9:31 am    Post subject: Reply to: Retain Overlay record in Splice
Reply with quote

Hi Frank,

I want only the fields from Overlay record irrespective of blanks or nonblanks in Base record as well as Overlay record.
This applies to all the WITH fields except ON fields.

Below is the sample input and expexted output.

Code:
Input file

----+----1----+----2----+----3----+----4----+----5----+----6----+----7
PROD1 FIGARO FIG0 PPS745     COBOLFIG P COBOLACD         01 08
PROD1 FIGARO FIG0 PPS746     COBOLFIG P COBOLACD G974650 01 05

DEVF1 FIGARO FIG1 PSS745     COBOLFIG E COBOLOCD G974606 01     04
DEVF1 FIGARO FIG1 PSS746     COBOLFIG E COBOLOCD         01     02


Expected output

----+----1----+----2----+----3----+----4----+----5----+----6----+----7
DEVF1 FIGARO FIG1 PSS745     COBOLFIG E COBOLOCD G974606 01 08  04
DEVF1 FIGARO FIG1 PSS746     COBOLFIG E COBOLOCD         01 05  02




Hope this clears.

Regards,
Sathish.
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: Thu Jul 15, 2010 4:05 am    Post subject:
Reply with quote

Quote:
want only the fields from Overlay record irrespective of blanks or nonblanks in Base record as well as Overlay record.
This applies to all the WITH fields except ON fields.


But in your output example you show 61-62 containing the field from the base record rather than from the overlay record. Was this a mistake? Would you really want blanks in 61-62 (as in the overlay record)? If not, what is the rule for that?

Also, for ON(19,10,CH), you have PPS fields in one case and PSS fields in the other case, so they won't match.

So I'm not sure what you really want, but try removing WITHANY and see if that does it. If not, explain more carefully what you want to do with an example that makes sense.
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 CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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