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
 

 

ICETOOL overlay for some characters

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

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Tue Jul 15, 2008 3:45 am    Post subject: ICETOOL overlay for some characters
Reply with quote

I have a FB/17 I/P file that looks like
Code:
----+----1----+----2
CSE00641LT123ARP1
CSE00642LT123ARP1
CSE00643LT123ARP1
CSE00644LT123ARP1
CSE04011LT456ARP1
CSE04011LT457ARP1
CSE00641LT124ARP2
CSE00642LT124ARP2
CSE00643LT124ARP2
CSE00644LT124ARP2
CSE04011LT454ARP2
CSE04011LT458ARP2
CSE04011LT459ARP2
CSE04011LT450ARP2
CSE04011LT451ARP2


and my o/p file should look like
Code:
----+----1----+----2
CSE00641LT123ARP1   
CSE00642LT123ARP1   
CSE00643LT123ARP1   
CSE00644LT123ARP1   
CSE00645LT123ARP1   
CSE00645LT123ARP1   
CSE00641LT124ARP2   
CSE00642LT124ARP2   
CSE00643LT124ARP2   
CSE00644LT124ARP2   
CSE00645LT124ARP2   
CSE00645LT124ARP2   
CSE00645LT124ARP2   
CSE00645LT124ARP2   
CSE00645LT124ARP2   


My requirement is I have to overlay the 9,5 chars from 'CSE00641' record to 'CSE04011' record and then convert all the 'CSE04011' to 'CSE00645'. Can this be accomplished in dfsort?
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 15, 2008 4:18 am    Post subject:
Reply with quote

Huh? Your explanation makes no sense and doesn't match your input/output.

For example, I see the following in positions 1-8 in your fifth input record:

CSE0401I

and the following in positions 1-8 in your fifth output record:

CSE00645

If you said you wanted to change 'CSE0401I' in positions 1-8 to 'CSE0645', that would make sense.

But instead you say you want to "overlay the 9,5 chars from 'CSE00641' record to 'CSE04011' record and then convert all the 'CSE04011' to 'CSE00645'". How does that relate to the input and output you show? What is 9,5? Why would you want to do a double conversion instead of a single conversion? I don't see any change to the 'CSE00641' input records.

I can show you how to do what you want to do with DFSORT, but first you have to do a better job of explaining what you want to do in terms of an example of input and output that makes sense.
Back to top
View user's profile Send private message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Tue Jul 15, 2008 5:29 am    Post subject:
Reply with quote

I was in a hurry so didn't do a good job of explaining what I want. I will rephrase my requirements.
There will be only one 'CSE00641' (1,8) for each 'ARP1' (14,4). But there can be more than one 'CSE04011' (1,8) for each 'ARP1' (14,4).

1) By "overlay the 9,5 chars from 'CSE00641' record to 'CSE04011' record" I meant, if (1,8) is 'CSE00641' copy (9,5) from this record and paste it to (9,5) in record where (1,8) is 'CSE04011', for the corresponding 14,4 (ARP1).

2) The next requirement is to change all 'CSE04011' to 'CSE00645' in (1,8).

Please let me know if I didn't make myself clear.
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 15, 2008 9:38 pm    Post subject:
Reply with quote

Yes, that's more clear.

However, it appears that each group of records starts with a CSE0641 record and you want to propagate the LTx value from that record to the rest of the records in the group. Is that true? Or is it possible that another record of the group (e.g. CSE0642) would have a different LTx value than the CSE0641 record for that group? Propagating the LTx value to each record of the group and changing each CSE0411 to CSE00645 would be easier than what you described.
Back to top
View user's profile Send private message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Tue Jul 15, 2008 9:54 pm    Post subject:
Reply with quote

You are right CSE00641 will not have a different LTX than CSE00642,3,4 with in the same group of (14,4). You restated the requirement exactly as I wanted but more clearly.
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 15, 2008 10:02 pm    Post subject:
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=...  input file (FB/17)
//OUT DD DSN=...  output file (FB/17)
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(81,8,ZD) KEEPBASE -
  WITHALL WITH(1,8) WITH(12,6) USING(CTL1)
/*
//CTL1CNTL DD *
  OPTION COPY
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(18:SEQNUM,8,ZD)),
        IFTHEN=(WHEN=(1,8,CH,EQ,C'CSE00641'),
                OVERLAY=(18:SEQNUM,8,ZD)),
        IFTHEN=(WHEN=NONE,
                OVERLAY=(26:SEQNUM,8,ZD,
                         18:18,8,ZD,SUB,26,8,ZD,TO=ZD,LENGTH=8))
  OUTFIL FNAMES=OUT,
    IFOUTLEN=17,
    IFTHEN=(WHEN=(1,8,CH,EQ,C'CSE04011'),OVERLAY=(1:C'CSE00645'))
/*
Back to top
View user's profile Send private message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Fri Jul 18, 2008 5:49 pm    Post subject:
Reply with quote

Thanks, this helped a lot. I really appreciate your time.
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: Wed Aug 06, 2008 5:16 am    Post subject:
Reply with quote

You can now do this more easily and efficiently with DFSORT's new WHEN=GROUP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this:

Code:

//S1   EXEC  PGM=ICEMAN
//SYSOUT   DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/17)
//SORTOUT DD DSN=...  output file (FB/17)
//SYSIN DD *
  OPTION COPY
  INREC IFTHEN=(WHEN=GROUP,
          BEGIN=(1,8,CH,EQ,C'CSE00641'),PUSH=(9:9,3))
  OUTFIL IFOUTLEN=17,
    IFTHEN=(WHEN=(1,8,CH,EQ,C'CSE04011'),OVERLAY=(1:C'CSE00645'))
/*


For complete details on the new WHEN=GROUP function and the other new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/
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 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
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts Remove Special Characters from Mainfr... Rodger Zhang All Other Mainframe Topics 6 Wed Jul 06, 2016 1:12 am
No new posts ICETOOL higher option Anshul Das DFSORT/ICETOOL 14 Thu Apr 14, 2016 8:00 am


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