Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Thomas Berg
 -Original Message-
 From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
 On Behalf Of Elardus Engelbrecht
 Sent: Wednesday, October 22, 2014 3:52 PM
 To: IBM-MAIN@LISTSERV.UA.EDU
 Subject: Re: DFSORT/ICETOOL pondering

 Thomas Berg wrote:

 Sometimes I have a need to do a selective copy of a dataset where the
 selection is both record sequence and record position/part dependent.
 And by that I mean the record part/position is varying depending on which
 record it's about.
 An example (yes, it looks silly):

 Who ever gave you homework is silly... ;-D

...it's me... :)

 I want to copy  position 31 to 40 of all records but from record 8 and 9 I 
 want
 to copy also (concatenate) position 71 to 80 and from record 6 to 8 I also
 (concatenate in front) want to copy position 1 to 3.

 Hmmm. Hard requirement if you want all of this in ONE pass. Could you be kind
 to post an example of your input and output?

An hypotethical example (monospace font recommended):

Input:
+1+2+3+4+5+6+7+8
001aaa01cc01
002aaa02cc02
003aaa03cc03
004aaa04cc04
005aaa05cc05
006aaa06cc06
007aaa07cc07
008aaa08cc08
009aaa09cc09
010aaa10cc10


Output:
+1+2+3
01
02
03
04
05
00606
00707
0080808
0909
10


 What about the rest of input? Should they stay the same during copy or left 
 out
 of the output?

The rest is discarded.

 I can see the use of the SUBSET (ICETOOL) for record selection but how do you
 user DFSORT/ICETOOL to solve the combining record and varying position needs
 ?

 What about SPLICE and JOIN?

I haven't looked more closely at these. Thought they required a matching file 
etc.

 I now use a homegrown program for this but it's lacking efficiency to say the
 least and I'm looking at DFSORTs efficiency and speed.

 How so? Could you post that program or some snippets? I believe I could do 
 that
 with REXX.

That program IS coded in REXX.  It works but it's a problem with (very) large 
files.
(This program is sort of a Swiss Army Knife with lot of other functions, this 
copy problem is a minor subfunction in it.
I use it e g as a line command at ISPF 3.4 etc.)



Best Regards,
Thomas Berg
___
Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Norbert Friemel
On Thu, 23 Oct 2014 15:43:44 +0200, Thomas Berg wrote:

 I want to copy  position 31 to 40 of all records but from record 8 and 9 I 
 want
 to copy also (concatenate) position 71 to 80 and from record 6 to 8 I also
 (concatenate in front) want to copy position 1 to 3.


//* 
//STEP1   EXEC PGM=SORT 
//* 
//SYSOUTDD SYSOUT=* 
//SORTINDD *
001aaa01cc01
002aaa02cc02
003aaa03cc03
004aaa04cc04
005aaa05cc05
006aaa06cc06
007aaa07cc07
008aaa08cc08
009aaa09cc09
010aaa10cc10
//SORTOUT   DD SYSOUT=* 
//SYSIN DD *
  INREC FIELDS=(1,80,SEQNUM,4,BI)   
  OUTREC IFTHEN=(WHEN=(81,4,BI,GE,6,,81,4,BI,LE,7),
BUILD=(1,3,31,10,80:X)),
 IFTHEN=(WHEN=(81,4,BI,EQ,8),   
BUILD=(1,3,31,10,71,10,80:X)),  
 IFTHEN=(WHEN=(81,4,BI,EQ,9),   
BUILD=(31,10,71,10,80:X)),  
 IFTHEN=(WHEN=NONE, 
BUILD=(31,10,80:X)) 
  OPTION COPY   
/*   

Norbert Friemel  

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Thomas Berg
Hi Kolusu,

The idea with symbols looks interesting.  I haven't used them but from recent 
RTFM they felt attractive.
1.  As this is to be used in a tool for general usage it can be of any 
(reasonable possible to implement) format.
2.  No.  This (primary) problem case is for a straight  inrecord---outrecord 
 transition.
3.  A (very) hypothetical example (regarding DCB it can be FB-FB, VB-VB, 
FB-VB, VB-FB, F-VB etc..):
(monospace font recommended)

Input:
+1+2+3+4+5+6+7+8
001aaa01cc01
002aaa02cc02
003aaa03cc03
004aaa04cc04
005aaa05cc05
006aaa06cc06
007aaa07cc07
008aaa08cc08
009aaa09cc09
010aaa10cc10

Output:
+1+2+3
01
02
03
04
05
00606
00707
0080808
0909
10

As I mentioned this problem is supposed to lead to a general solution/template 
to be used in a TSO/ISPF tool.
The tool is coded in REXX and used e g as a line command at ISPF 3.4 etc.  I 
intend to call DFSORT/ICETOOL from the program with customized control 
statements for each actual case.  Currently I do this with REXX EXECIO, stems 
etc.



Best Regards,
Thomas Berg
___
Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)

 -Original Message-
 From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
 On Behalf Of Sri h Kolusu
 Sent: Wednesday, October 22, 2014 6:12 PM
 To: IBM-MAIN@LISTSERV.UA.EDU
 Subject: Re: DFSORT/ICETOOL pondering

 Thomas,

 I do think it is possible to reformat the selective data using symbols
 from various positions of the record. Are we dealing with FB file or VB
 files ?  Regarding the concatenation of data, do you always want to
 combine 2 records data into a single record? It would be great if you can
 show us a sample data and desired output with the DCB properties of the
 input and output files.

 Thanks,
 Kolusu
 DFSORT Development

 IBM Mainframe Discussion List 
 IBM-MAIN@LISTSERV.UA.EDUmailto:IBM-MAIN@LISTSERV.UA.EDU wrote on
 10/21/2014 10:54:39 PM:

  From: Thomas Berg thomas.b...@swedbank.semailto:thomas.b...@swedbank.se
  To: IBM-MAIN@LISTSERV.UA.EDUmailto:IBM-MAIN@LISTSERV.UA.EDU
  Date: 10/21/2014 10:56 PM
  Subject: DFSORT/ICETOOL pondering
  Sent by: IBM Mainframe Discussion List 
  IBM-MAIN@LISTSERV.UA.EDUmailto:IBM-MAIN@LISTSERV.UA.EDU
 
  Sometimes I have a need to do a selective copy of a dataset where
  the selection is both record sequence and record position/part
 dependent.
  And by that I mean the record part/position is varying depending on
  which record it's about.
  An example (yes, it looks silly):
 
  I want to copy  position 31 to 40 of all records but from record 8
  and 9 I want to copy also (concatenate) position 71 to 80 and from
  record 6 to 8 I also (concatenate in front) want to copy position 1 to
 3.
  The point of this example is to illustrate the needs of a more
  general solution.
 
  I can see the use of the SUBSET (ICETOOL) for record selection but
  how do you user DFSORT/ICETOOL to solve the combining record and
  varying position needs ?
  I now use a homegrown program for this but it's lacking efficiency
  to say the least and I'm looking at DFSORTs efficiency and speed.
 
  I have been looking at OUTFIL/OUTREC etc. but I can't see a straight
  forward and general solution/template.
  I'm hoping for someone who have done this before to supply an example.
 
 
 
  Best Regards,
  Thomas Berg
 
 _
 __
  Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)
 
  --
  For IBM-MAIN subscribe / signoff / archive access instructions,
  send email to lists...@listserv.ua.edumailto:lists...@listserv.ua.edu 
  with the message: INFO IBM-MAIN
 

 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edumailto:lists...@listserv.ua.edu with 
 the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff

Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Thomas Berg
Hi Alfred,

You can look at the answers I gave Elardus and Kolusu for the example data. 
1. I'm not sure if I understand your question exactly, this (primary) problem 
case is for a straight  inrecord---outrecord  transition
2. Not necessarily.  I'm out for a general solution.



Best Regards,
Thomas Berg
___ 
Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)


 -Original Message-
 From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
 On Behalf Of Alfred Cole
 Sent: Wednesday, October 22, 2014 8:45 PM
 To: IBM-MAIN@LISTSERV.UA.EDU
 Subject: Re: DFSORT/ICETOOL pondering
 
 Thomas,
 
 In the example that you stated,
 1. are the records apart of a set of records
 2. does each record have a unique identifier and sequence key.
 
 If so, the you could extract records 8 and perform a specific operations and
 then resort the records back into the record set.
 
 
 
 -Original Message-
 From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
 On
 Behalf Of Sri h Kolusu
 Sent: Wednesday, October 22, 2014 11:12 AM
 To: IBM-MAIN@LISTSERV.UA.EDU
 Subject: Re: DFSORT/ICETOOL pondering
 
 Thomas,
 
 I do think it is possible to reformat the selective data using symbols from
 various positions of the record. Are we dealing with FB file or VB files ?
 Regarding the concatenation of data, do you always want to combine 2 records
 data into a single record? It would be great if you can show us a sample
 data and desired output with the DCB properties of the input and output
 files.
 
 Thanks,
 Kolusu
 DFSORT Development
 
 IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on
 10/21/2014 10:54:39 PM:
 
  From: Thomas Berg thomas.b...@swedbank.se
  To: IBM-MAIN@LISTSERV.UA.EDU
  Date: 10/21/2014 10:56 PM
  Subject: DFSORT/ICETOOL pondering
  Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU
 
  Sometimes I have a need to do a selective copy of a dataset where the
  selection is both record sequence and record position/part
 dependent.
  And by that I mean the record part/position is varying depending on
  which record it's about.
  An example (yes, it looks silly):
 
  I want to copy  position 31 to 40 of all records but from record 8 and
  9 I want to copy also (concatenate) position 71 to 80 and from record
  6 to 8 I also (concatenate in front) want to copy position 1 to
 3.
  The point of this example is to illustrate the needs of a more general
  solution.
 
  I can see the use of the SUBSET (ICETOOL) for record selection but how
  do you user DFSORT/ICETOOL to solve the combining record and varying
  position needs ?
  I now use a homegrown program for this but it's lacking efficiency to
  say the least and I'm looking at DFSORTs efficiency and speed.
 
  I have been looking at OUTFIL/OUTREC etc. but I can't see a straight
  forward and general solution/template.
  I'm hoping for someone who have done this before to supply an example.
 
 
 
  Best Regards,
  Thomas Berg
 
 _
 __
  Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)
 
  --
  For IBM-MAIN subscribe / signoff / archive access instructions, send
  email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
 
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions, send email
 to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Elardus Engelbrecht
Thomas Berg wrote:
 
An hypotethical example (monospace font recommended): 
 
Input: 
+1+2+3+4+5+6+7+8
 
001aaa01cc01
 
002aaa02cc02
 
003aaa03cc03
 
004aaa04cc04
 
005aaa05cc05
 
006aaa06cc06
 
007aaa07cc07
 
008aaa08cc08
 
009aaa09cc09
 
010aaa10cc10
 
 
Output: 
+1+2+3 
01 
02 
03 
04 
05 
00606 
00707 
0080808 
0909 
10 

Hmmm, sounds familiar. I believe I saw a similar thing (conditional formatting 
during copy where lines are already numbered) in either old IBM-MAIN threads or 
in one of my ICETOOL jobs.

Something of IF (x = 006) or (x = 007) then do y or something like that.

I'll have to dig in my fading memory and search to SORT this out

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Thomas Berg
 -Original Message-
 From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
 On Behalf Of Norbert Friemel
 Sent: Thursday, October 23, 2014 3:58 PM
 To: IBM-MAIN@LISTSERV.UA.EDU
 Subject: Re: DFSORT/ICETOOL pondering
 On Thu, 23 Oct 2014 15:43:44 +0200, Thomas Berg wrote:

  I want to copy  position 31 to 40 of all records but from record 8 and 9 I 
  want
  to copy also (concatenate) position 71 to 80 and from record 6 to 8 I also
  (concatenate in front) want to copy position 1 to 3.

 //STEP1   EXEC PGM=SORT
 //SYSOUTDD SYSOUT=*
 //SORTINDD *
 001aaa01
 cc01
 002aaa02
 cc02
 003aaa03
 cc03
 004aaa04
 cc04
 005aaa05
 cc05
 006aaa06
 cc06
 007aaa07
 cc07
 008aaa08
 cc08
 009aaa09
 cc09
 010aaa10
 cc10
 //SORTOUT   DD SYSOUT=*
 //SYSIN DD *
   INREC FIELDS=(1,80,SEQNUM,4,BI)
   OUTREC IFTHEN=(WHEN=(81,4,BI,GE,6,,81,4,BI,LE,7),
 BUILD=(1,3,31,10,80:X)),
  IFTHEN=(WHEN=(81,4,BI,EQ,8),
 BUILD=(1,3,31,10,71,10,80:X)),
  IFTHEN=(WHEN=(81,4,BI,EQ,9),
 BUILD=(31,10,71,10,80:X)),
  IFTHEN=(WHEN=NONE,
 BUILD=(31,10,80:X))
   OPTION COPY
 /*

Thanks for the example.  Although the numeric sequence numbers were there just 
to clarify the operation, rather than be an indication of the assumed format of 
an actual case.  Do you have an example where you can’t rely on a key/sequence 
field and have to depend on the actual occurrence of the record order ?



Best Regards,
Thomas Berg
___
Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)






--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Norbert Friemel
On Thu, 23 Oct 2014 16:07:41 +0200, Thomas Berg wrote:

 Thanks for the example.  Although the numeric sequence numbers were there 
 just to clarify the operation, 
 rather than be an indication of the assumed format of an actual case.  Do you 
 have an example where you 
 can’t rely on a key/sequence field and have to depend on the actual 
 occurrence of the record order ?

INREC adds a (binary) sequence number in position 81-84. OUTREC checks pos. 
81-84, not the sequence numbers in the example.

Norbert Friemel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Elardus Engelbrecht
Thomas Berg wrote:

Thanks for the example. 

Thanks Norbert Friemel for your example showing IFTHEN and BUILD. 

Although the numeric sequence numbers were there just to clarify the 
operation, rather than be an indication of the assumed format of an actual 
case.  Do you have an example where you can’t rely on a key/sequence field and 
have to depend on the actual occurrence of the record order ? 

I certainly remember that some DFSORT gurus supplied answers in the past on 
IBM-MAIN where you insert key/sequence field, then do your 
selection/formatting/copy and remove the key/sequence field.

Thanks for highlighting this.

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Thomas Berg
 -Original Message-
 From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
 On Behalf Of Elardus Engelbrecht
 Sent: Thursday, October 23, 2014 4:06 PM
 To: IBM-MAIN@LISTSERV.UA.EDU
 Subject: Re: DFSORT/ICETOOL pondering
 
 Thomas Berg wrote:
 
 An hypotethical example (monospace font recommended):
 
 Input:
 +1+2+3+4+5+6+7+8
 001aaa01
 cc01
 002aaa02
 cc02
 003aaa03
 cc03
 004aaa04
 cc04
 005aaa05
 cc05
 006aaa06
 cc06
 007aaa07
 cc07
 008aaa08
 cc08
 009aaa09
 cc09
 010aaa10
 cc10
 
 Output:
 +1+2+3
 01
 02
 03
 04
 05
 00606
 00707
 0080808
 0909
 10
 
 Hmmm, sounds familiar. I believe I saw a similar thing (conditional formatting
 during copy where lines are already numbered) in either old IBM-MAIN threads
 or in one of my ICETOOL jobs.

Please, don't rely on the sequential numbers in the example, the numeric 
sequence numbers were there just to clarify the operation, rather than be an 
indication of the assumed format of an actual case.

 
 Something of IF (x = 006) or (x = 007) then do y or something like that.
 
 I'll have to dig in my fading memory and search to SORT this out
Thanks! :)



Best Regards,
Thomas Berg
___ 
Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Thomas Berg
 -Original Message-
 From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
 On Behalf Of Norbert Friemel
 Sent: Thursday, October 23, 2014 4:13 PM
 To: IBM-MAIN@LISTSERV.UA.EDU
 Subject: Re: DFSORT/ICETOOL pondering
 
 On Thu, 23 Oct 2014 16:07:41 +0200, Thomas Berg wrote:
 
  Thanks for the example.  Although the numeric sequence numbers were there
 just to clarify the operation,
  rather than be an indication of the assumed format of an actual case.  Do 
  you
 have an example where you
  can’t rely on a key/sequence field and have to depend on the actual
 occurrence of the record order ?
 
 INREC adds a (binary) sequence number in position 81-84. OUTREC checks pos.
 81-84, not the sequence numbers in the example.

You're right.  I read your example in a sloppy way.  I was somehow prejudging 
your intent as of using the numbers.  Sorry for that. 
(I'm somehow trigger happy at times.) 



Best Regards,
Thomas Berg
___ 
Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Thomas Berg
 -Original Message-
 From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On 
 Behalf Of
 Norbert Friemel
 Sent: Thursday, October 23, 2014 3:58 PM
 To: IBM-MAIN@LISTSERV.UA.EDU
 Subject: Re: DFSORT/ICETOOL pondering

 //STEP1   EXEC PGM=SORT
 //SYSOUTDD SYSOUT=*
 //SORTINDD *
 001aaa01cc01
 002aaa02cc02
 003aaa03cc03
 004aaa04cc04
 005aaa05cc05
 006aaa06cc06
 007aaa07cc07
 008aaa08cc08
 009aaa09cc09
 010aaa10cc10
 //SORTOUT   DD SYSOUT=*
 //SYSIN DD *
   INREC FIELDS=(1,80,SEQNUM,4,BI)
   OUTREC IFTHEN=(WHEN=(81,4,BI,GE,6,,81,4,BI,LE,7),
 BUILD=(1,3,31,10,80:X)),
  IFTHEN=(WHEN=(81,4,BI,EQ,8),
 BUILD=(1,3,31,10,71,10,80:X)),
  IFTHEN=(WHEN=(81,4,BI,EQ,9),
 BUILD=(31,10,71,10,80:X)),
  IFTHEN=(WHEN=NONE,
 BUILD=(31,10,80:X))
   OPTION COPY
 /*

When looking at this a second time, it seems very promising and more 
customizable than SUBSET + other options. 
One question: you placed the BI-field at the end.  If it was very long records, 
would it from a performance view be better to place it in front, at position 1 
(or 5 if V records)? 



Best Regards,
Thomas Berg
___ 
Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Norbert Friemel
On Thu, 23 Oct 2014 16:36:04 +0200, Thomas Berg wrote:

 When looking at this a second time, it seems very promising and more 
 customizable than SUBSET + other options. 
 One question: you placed the BI-field at the end.  If it was very long 
 records, would it from a performance view be better to place it in front, at 
  position 1 (or 5 if V records)?

For recfm=v(b) I'd place the sequence number in front:

//* 
//STEP1   EXEC PGM=SORT 
//* 
//SYSOUTDD SYSOUT=* 
//SORTINDD *
001aaa01cc01
002aaa02cc02
003aaa03cc03
004aaa04cc04
005aaa05cc05
006aaa06cc06
007aaa07cc07
008aaa08cc08
009aaa09cc09
010aaa10cc10
/*  
//SORTOUT   DD DISP=(,PASS),
// DSN=amp;VB,

// SPACE=(TRK,(1,1)),   
// LRECL=84,RECFM=VB
//SYSIN DD *
  OPTION COPY   
  OUTFIL FTOV   
/*  
//* 
//STEP2   EXEC PGM=SORT 
//* 
//SYSOUTDD SYSOUT=* 
//SORTINDD DISP=(OLD,DELETE),DSN=amp;VB   

//SORTOUT   DD SYSOUT=* 
//SYSIN DD *
  INREC FIELDS=(1,4,SEQNUM,4,BI,5,80)   
  OUTREC IFTHEN=(WHEN=(5,4,BI,GE,6,,5,4,BI,LE,7),  
BUILD=(1,4,9,3,39,10)), 
 IFTHEN=(WHEN=(5,4,BI,EQ,8),
BUILD=(1,4,9,3,39,10,79,10)),   
 IFTHEN=(WHEN=(5,4,BI,EQ,9),
BUILD=(1,4,39,10,79,10)),   
 IFTHEN=(WHEN=NONE, 
BUILD=(1,4,39,10))  
  OPTION COPY   
/*  

Norbert Friemel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Sri h Kolusu
Thomas,

As others have explained it is quite simple to get the desired results. I 
am showing examples for both FB and VB files using symbols. With symbols 
you have the flexibility of changing it and then not worry about changing 
the control cards.

A brief explanation of the job.

1. The first IFTHEN with WHEN=INIT, we will number all records in the file 
with a 8 byte sequence number.

2. The next 2 IFTHEN statements will validate that sequence number and 
build the record. If you have more ranges then you can add IFTHEN 
statements before the last IFTHEN with WHEN=NONE statement


//STEP0100 EXEC PGM=SORT 
//SYSOUT   DD SYSOUT=* 
//SYMNOUT  DD SYSOUT=* 
//SYMNAMES DD * 
FILE-REC-LENGTH,1,80,CH 
RECORD-SEQ-NUMBER,*,8,ZD 
REQD-DATA1,1,3,CH 
REQD-DATA2,31,10,CH 
REQD-DATA3,71,10,CH 
RECD-SELECT-NUM1,5 
RECD-SELECT-NUM2,7 
RECD-SELECT-NUM3,9 
//SORTIN   DD DISP=SHR,DSN=Your Input FB file  
//SORTOUT  DD SYSOUT=* 
//SYSINDD * 
  OPTION COPY 
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(RECORD-SEQ-NUMBER:SEQNUM,8,ZD)), 

  IFTHEN=(WHEN=(RECORD-SEQ-NUMBER,GT,RECD-SELECT-NUM1,AND, 
RECORD-SEQ-NUMBER,LE,RECD-SELECT-NUM2), 
  BUILD=(REQD-DATA1,REQD-DATA2)), 

  IFTHEN=(WHEN=(RECORD-SEQ-NUMBER,GT,RECD-SELECT-NUM2,AND, 
RECORD-SEQ-NUMBER,LE,RECD-SELECT-NUM3), 
  BUILD=(REQD-DATA1,REQD-DATA2,REQD-DATA3)), 

  IFTHEN=(WHEN=NONE,BUILD=(REQD-DATA2)) 

//*

The above control cards will be translated as the following

//SYSINDD * 
  OPTION COPY 
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)), 

  IFTHEN=(WHEN=(81,8,ZD,GT,5,AND,81,8,ZD,LE,7), 
  BUILD=(1,3,31,10)), 

  IFTHEN=(WHEN=(81,8,ZD,GT,7,AND,81,8,ZD,LE,9), 
  BUILD=(1,3,31,10,71,10)), 

  IFTHEN=(WHEN=NONE,BUILD=(31,10)) 
//* 

If you have VB input files then you need to use sequencing of the records 
right after the RDW.

//STEP0200 EXEC PGM=SORT 
//SYSOUT   DD SYSOUT=* 
//SYMNOUT  DD SYSOUT=* 
//SYMNAMES DD * 
FILE-RDW,1,4,BI 
RECORD-SEQ-NUMBER,*,8,ZD 
VBDATA-SPOS,= 
REQD-DATA1,*,3,CH 
SKIP,27 
REQD-DATA2,*,10,CH 
SKIP,30 
REQD-DATA3,*,10,CH 
RECD-SELECT-NUM1,5 
RECD-SELECT-NUM2,7 
RECD-SELECT-NUM3,9 
//SORTIN   DD DISP=SHR,DSN=Your Input VB File 
//SORTOUT  DD SYSOUT=* 
//SYSINDD * 
  OPTION COPY 
  INREC IFTHEN=(WHEN=INIT, 
  BUILD=(FILE-RDW,RECORD-SEQ-NUMBER:SEQNUM,8,ZD,VBDATA-SPOS)), 

  IFTHEN=(WHEN=(RECORD-SEQ-NUMBER,GT,RECD-SELECT-NUM1,AND, 
RECORD-SEQ-NUMBER,LE,RECD-SELECT-NUM2), 
  BUILD=(FILE-RDW,REQD-DATA1,REQD-DATA2)), 

  IFTHEN=(WHEN=(RECORD-SEQ-NUMBER,GT,RECD-SELECT-NUM2,AND, 
RECORD-SEQ-NUMBER,LE,RECD-SELECT-NUM3), 
  BUILD=(FILE-RDW,REQD-DATA1,REQD-DATA2,REQD-DATA3)), 

  IFTHEN=(WHEN=NONE,BUILD=(FILE-RDW,REQD-DATA2)) 
//*

Further if you have any questions, please let me know

Thanks,
Kolusu
DFSORT Development

IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on 
10/23/2014 06:43:44 AM:

 From: Thomas Berg thomas.b...@swedbank.se
 To: IBM-MAIN@LISTSERV.UA.EDU
 Date: 10/23/2014 06:44 AM
 Subject: Re: DFSORT/ICETOOL pondering
 Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU
 
  -Original Message-
  From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
  On Behalf Of Elardus Engelbrecht
  Sent: Wednesday, October 22, 2014 3:52 PM
  To: IBM-MAIN@LISTSERV.UA.EDU
  Subject: Re: DFSORT/ICETOOL pondering
 
  Thomas Berg wrote:
 
  Sometimes I have a need to do a selective copy of a dataset where the
  selection is both record sequence and record position/part dependent.
  And by that I mean the record part/position is varying depending on 
which
  record it's about.
  An example (yes, it looks silly):
 
  Who ever gave you homework is silly... ;-D
 
 ...it's me... :)
 
  I want to copy  position 31 to 40 of all records but from record 
 8 and 9 I want
  to copy also (concatenate) position 71 to 80 and from record 6 to 8 I 
also
  (concatenate in front) want to copy position 1 to 3.
 
  Hmmm. Hard requirement if you want all of this in ONE pass. Could 
 you be kind
  to post an example of your input and output?
 
 An hypotethical example (monospace font recommended):
 
 Input:
 +1+2+3+4+5+6
 +7+8
 
001aaa01cc01
 
002aaa02cc02
 
003aaa03cc03
 
004aaa04cc04
 
005aaa05cc05
 
006aaa06cc06
 
007aaa07cc07
 
008aaa08cc08
 
009aaa09cc09

Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Sri h Kolusu
 I certainly remember that some DFSORT gurus supplied answers in the 
past on IBM-MAIN where you insert key/sequence field, then do your 
selection/formatting/copy and remove the key/sequence field.

Elardus Engelbrecht,

And we still continue to answer questions related to DFSORT on IBM-Main

Thanks,
Kolusu
DFSORT Development

IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on 
10/23/2014 07:14:38 AM:

 From: Elardus Engelbrecht elardus.engelbre...@sita.co.za
 To: IBM-MAIN@LISTSERV.UA.EDU
 Date: 10/23/2014 07:15 AM
 Subject: Re: DFSORT/ICETOOL pondering
 Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU
 
 Thomas Berg wrote:
 
 Thanks for the example. 
 
 Thanks Norbert Friemel for your example showing IFTHEN and BUILD. 
 
 Although the numeric sequence numbers were there just to clarify 
 the operation, rather than be an indication of the assumed format of
 an actual case.  Do you have an example where you can’t rely on a 
 key/sequence field and have to depend on the actual occurrence of 
 the record order ? 
 
 I certainly remember that some DFSORT gurus supplied answers in the 
 past on IBM-MAIN where you insert key/sequence field, then do your 
 selection/formatting/copy and remove the key/sequence field.
 
 Thanks for highlighting this.
 
 Groete / Greetings
 Elardus Engelbrecht
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Thomas Berg
Thanks Kolusu!

It seems so easy when you (and Norbert) explains!  :) 
Of course I should RTFM, but when you are ignorant it takes time find the 
relevant pieces.   

(I wonder how many work hours the help here at IBM-MAIN have saved?)  



Best Regards,
Thomas Berg
___ 
Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)

 -Original Message-
 From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On 
 Behalf Of Sri h
 Kolusu
 Sent: Thursday, October 23, 2014 6:09 PM
 To: IBM-MAIN@LISTSERV.UA.EDU
 Subject: Re: DFSORT/ICETOOL pondering
 
 Thomas,
 
 As others have explained it is quite simple to get the desired results. I
 am showing examples for both FB and VB files using symbols. With symbols
 you have the flexibility of changing it and then not worry about changing
 the control cards.
 
 A brief explanation of the job.
 
 1. The first IFTHEN with WHEN=INIT, we will number all records in the file
 with a 8 byte sequence number.
 
 2. The next 2 IFTHEN statements will validate that sequence number and
 build the record. If you have more ranges then you can add IFTHEN
 statements before the last IFTHEN with WHEN=NONE statement
 
 
 //STEP0100 EXEC PGM=SORT
 //SYSOUT   DD SYSOUT=*
 //SYMNOUT  DD SYSOUT=*
 //SYMNAMES DD *
 FILE-REC-LENGTH,1,80,CH
 RECORD-SEQ-NUMBER,*,8,ZD
 REQD-DATA1,1,3,CH
 REQD-DATA2,31,10,CH
 REQD-DATA3,71,10,CH
 RECD-SELECT-NUM1,5
 RECD-SELECT-NUM2,7
 RECD-SELECT-NUM3,9
 //SORTIN   DD DISP=SHR,DSN=Your Input FB file
 //SORTOUT  DD SYSOUT=*
 //SYSINDD *
   OPTION COPY
   INREC IFTHEN=(WHEN=INIT,OVERLAY=(RECORD-SEQ-NUMBER:SEQNUM,8,ZD)),
 
   IFTHEN=(WHEN=(RECORD-SEQ-NUMBER,GT,RECD-SELECT-NUM1,AND,
 RECORD-SEQ-NUMBER,LE,RECD-SELECT-NUM2),
   BUILD=(REQD-DATA1,REQD-DATA2)),
 
   IFTHEN=(WHEN=(RECORD-SEQ-NUMBER,GT,RECD-SELECT-NUM2,AND,
 RECORD-SEQ-NUMBER,LE,RECD-SELECT-NUM3),
   BUILD=(REQD-DATA1,REQD-DATA2,REQD-DATA3)),
 
   IFTHEN=(WHEN=NONE,BUILD=(REQD-DATA2))
 
 //*
 
 The above control cards will be translated as the following
 
 //SYSINDD *
   OPTION COPY
   INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),
 
   IFTHEN=(WHEN=(81,8,ZD,GT,5,AND,81,8,ZD,LE,7),
   BUILD=(1,3,31,10)),
 
   IFTHEN=(WHEN=(81,8,ZD,GT,7,AND,81,8,ZD,LE,9),
   BUILD=(1,3,31,10,71,10)),
 
   IFTHEN=(WHEN=NONE,BUILD=(31,10))
 //*
 
 If you have VB input files then you need to use sequencing of the records
 right after the RDW.
 
 //STEP0200 EXEC PGM=SORT
 //SYSOUT   DD SYSOUT=*
 //SYMNOUT  DD SYSOUT=*
 //SYMNAMES DD *
 FILE-RDW,1,4,BI
 RECORD-SEQ-NUMBER,*,8,ZD
 VBDATA-SPOS,=
 REQD-DATA1,*,3,CH
 SKIP,27
 REQD-DATA2,*,10,CH
 SKIP,30
 REQD-DATA3,*,10,CH
 RECD-SELECT-NUM1,5
 RECD-SELECT-NUM2,7
 RECD-SELECT-NUM3,9
 //SORTIN   DD DISP=SHR,DSN=Your Input VB File
 //SORTOUT  DD SYSOUT=*
 //SYSINDD *
   OPTION COPY
   INREC IFTHEN=(WHEN=INIT,
   BUILD=(FILE-RDW,RECORD-SEQ-NUMBER:SEQNUM,8,ZD,VBDATA-SPOS)),
 
   IFTHEN=(WHEN=(RECORD-SEQ-NUMBER,GT,RECD-SELECT-NUM1,AND,
 RECORD-SEQ-NUMBER,LE,RECD-SELECT-NUM2),
   BUILD=(FILE-RDW,REQD-DATA1,REQD-DATA2)),
 
   IFTHEN=(WHEN=(RECORD-SEQ-NUMBER,GT,RECD-SELECT-NUM2,AND,
 RECORD-SEQ-NUMBER,LE,RECD-SELECT-NUM3),
   BUILD=(FILE-RDW,REQD-DATA1,REQD-DATA2,REQD-DATA3)),
 
   IFTHEN=(WHEN=NONE,BUILD=(FILE-RDW,REQD-DATA2))
 //*
 
 Further if you have any questions, please let me know
 
 Thanks,
 Kolusu
 DFSORT Development
 
 IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on
 10/23/2014 06:43:44 AM:
 
  From: Thomas Berg thomas.b...@swedbank.se
  To: IBM-MAIN@LISTSERV.UA.EDU
  Date: 10/23/2014 06:44 AM
  Subject: Re: DFSORT/ICETOOL pondering
  Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU
 
   -Original Message-
   From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
   On Behalf Of Elardus Engelbrecht
   Sent: Wednesday, October 22, 2014 3:52 PM
   To: IBM-MAIN@LISTSERV.UA.EDU
   Subject: Re: DFSORT/ICETOOL pondering
  
   Thomas Berg wrote:
  
   Sometimes I have a need to do a selective copy of a dataset where the
   selection is both record sequence and record position/part dependent.
   And by that I mean the record part/position is varying depending on
 which
   record it's about.
   An example (yes, it looks silly):
  
   Who ever gave you homework is silly... ;-D
 
  ...it's me... :)
 
   I want to copy  position 31 to 40 of all records but from record
  8 and 9 I want
   to copy also (concatenate) position 71 to 80 and from record 6 to 8 I
 also
   (concatenate in front) want to copy position 1 to 3.
  
   Hmmm. Hard requirement if you want all of this in ONE pass. Could
  you be kind
   to post an example of your input and output?
 
  An hypotethical example (monospace font recommended):
 
  Input:
  +1+2+3+4+5+6
  +7+8

Re: DFSORT/ICETOOL pondering

2014-10-23 Thread Steve Comstock

On 10/23/2014 10:22 AM, Thomas Berg wrote:

Thanks Kolusu!

It seems so easy when you (and Norbert) explains!  :)
Of course I should RTFM, but when you are ignorant it takes time find the 
relevant pieces.


Or ... you could take a class. I'd come out of retirement for a bit
in order to teacch in Stockholm again. :-)

  http://www.trainersfriend.com/JCL_courses/B625descrpt.htm

(also pointed at from:

  http://www-01.ibm.com/support/docview.wss?rs=0uid=isg3T782

)


-Steve Comstock




(I wonder how many work hours the help here at IBM-MAIN have saved?)



Best Regards,
Thomas Berg
___
Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Sri h
Kolusu
Sent: Thursday, October 23, 2014 6:09 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: DFSORT/ICETOOL pondering

Thomas,

As others have explained it is quite simple to get the desired results. I
am showing examples for both FB and VB files using symbols. With symbols
you have the flexibility of changing it and then not worry about changing
the control cards.

A brief explanation of the job.

1. The first IFTHEN with WHEN=INIT, we will number all records in the file
with a 8 byte sequence number.

2. The next 2 IFTHEN statements will validate that sequence number and
build the record. If you have more ranges then you can add IFTHEN
statements before the last IFTHEN with WHEN=NONE statement


//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SYMNOUT  DD SYSOUT=*
//SYMNAMES DD *
FILE-REC-LENGTH,1,80,CH
RECORD-SEQ-NUMBER,*,8,ZD
REQD-DATA1,1,3,CH
REQD-DATA2,31,10,CH
REQD-DATA3,71,10,CH
RECD-SELECT-NUM1,5
RECD-SELECT-NUM2,7
RECD-SELECT-NUM3,9
//SORTIN   DD DISP=SHR,DSN=Your Input FB file
//SORTOUT  DD SYSOUT=*
//SYSINDD *
   OPTION COPY
   INREC IFTHEN=(WHEN=INIT,OVERLAY=(RECORD-SEQ-NUMBER:SEQNUM,8,ZD)),

   IFTHEN=(WHEN=(RECORD-SEQ-NUMBER,GT,RECD-SELECT-NUM1,AND,
 RECORD-SEQ-NUMBER,LE,RECD-SELECT-NUM2),
   BUILD=(REQD-DATA1,REQD-DATA2)),

   IFTHEN=(WHEN=(RECORD-SEQ-NUMBER,GT,RECD-SELECT-NUM2,AND,
 RECORD-SEQ-NUMBER,LE,RECD-SELECT-NUM3),
   BUILD=(REQD-DATA1,REQD-DATA2,REQD-DATA3)),

   IFTHEN=(WHEN=NONE,BUILD=(REQD-DATA2))

//*

The above control cards will be translated as the following

//SYSINDD *
   OPTION COPY
   INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),

   IFTHEN=(WHEN=(81,8,ZD,GT,5,AND,81,8,ZD,LE,7),
   BUILD=(1,3,31,10)),

   IFTHEN=(WHEN=(81,8,ZD,GT,7,AND,81,8,ZD,LE,9),
   BUILD=(1,3,31,10,71,10)),

   IFTHEN=(WHEN=NONE,BUILD=(31,10))
//*

If you have VB input files then you need to use sequencing of the records
right after the RDW.

//STEP0200 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SYMNOUT  DD SYSOUT=*
//SYMNAMES DD *
FILE-RDW,1,4,BI
RECORD-SEQ-NUMBER,*,8,ZD
VBDATA-SPOS,=
REQD-DATA1,*,3,CH
SKIP,27
REQD-DATA2,*,10,CH
SKIP,30
REQD-DATA3,*,10,CH
RECD-SELECT-NUM1,5
RECD-SELECT-NUM2,7
RECD-SELECT-NUM3,9
//SORTIN   DD DISP=SHR,DSN=Your Input VB File
//SORTOUT  DD SYSOUT=*
//SYSINDD *
   OPTION COPY
   INREC IFTHEN=(WHEN=INIT,
   BUILD=(FILE-RDW,RECORD-SEQ-NUMBER:SEQNUM,8,ZD,VBDATA-SPOS)),

   IFTHEN=(WHEN=(RECORD-SEQ-NUMBER,GT,RECD-SELECT-NUM1,AND,
 RECORD-SEQ-NUMBER,LE,RECD-SELECT-NUM2),
   BUILD=(FILE-RDW,REQD-DATA1,REQD-DATA2)),

   IFTHEN=(WHEN=(RECORD-SEQ-NUMBER,GT,RECD-SELECT-NUM2,AND,
 RECORD-SEQ-NUMBER,LE,RECD-SELECT-NUM3),
   BUILD=(FILE-RDW,REQD-DATA1,REQD-DATA2,REQD-DATA3)),

   IFTHEN=(WHEN=NONE,BUILD=(FILE-RDW,REQD-DATA2))
//*

Further if you have any questions, please let me know

Thanks,
Kolusu
DFSORT Development

IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on
10/23/2014 06:43:44 AM:


From: Thomas Berg thomas.b...@swedbank.se
To: IBM-MAIN@LISTSERV.UA.EDU
Date: 10/23/2014 06:44 AM
Subject: Re: DFSORT/ICETOOL pondering
Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
On Behalf Of Elardus Engelbrecht
Sent: Wednesday, October 22, 2014 3:52 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: DFSORT/ICETOOL pondering

Thomas Berg wrote:


Sometimes I have a need to do a selective copy of a dataset where the

selection is both record sequence and record position/part dependent.

And by that I mean the record part/position is varying depending on

which

record it's about.

An example (yes, it looks silly):


Who ever gave you homework is silly... ;-D


...it's me... :)


I want to copy  position 31 to 40 of all records but from record

8 and 9 I want

to copy also (concatenate) position 71 to 80 and from record 6 to 8 I

also

(concatenate in front) want to copy position 1 to 3.

Hmmm. Hard requirement if you want all of this in ONE pass. Could

you be kind

to post an example of your input and output?


An hypotethical example (monospace font

Re: DFSORT/ICETOOL pondering

2014-10-22 Thread Elardus Engelbrecht
Thomas Berg wrote:

Sometimes I have a need to do a selective copy of a dataset where the 
selection is both record sequence and record position/part dependent. 
And by that I mean the record part/position is varying depending on which 
record it's about.  
An example (yes, it looks silly):

Who ever gave you homework is silly... ;-D

I want to copy  position 31 to 40 of all records but from record 8 and 9 I 
want to copy also (concatenate) position 71 to 80 and from record 6 to 8 I 
also (concatenate in front) want to copy position 1 to 3.  

Hmmm. Hard requirement if you want all of this in ONE pass. Could you be kind 
to post an example of your input and output?

What about the rest of input? Should they stay the same during copy or left out 
of the output?

I can see the use of the SUBSET (ICETOOL) for record selection but how do you 
user DFSORT/ICETOOL to solve the combining record and varying position needs ? 

What about SPLICE and JOIN?

I now use a homegrown program for this but it's lacking efficiency to say the 
least and I'm looking at DFSORTs efficiency and speed.

How so? Could you post that program or some snippets? I believe I could do that 
with REXX.

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-22 Thread Sri h Kolusu
Thomas,

I do think it is possible to reformat the selective data using symbols 
from various positions of the record. Are we dealing with FB file or VB 
files ?  Regarding the concatenation of data, do you always want to 
combine 2 records data into a single record? It would be great if you can 
show us a sample data and desired output with the DCB properties of the 
input and output files.
 
Thanks,
Kolusu
DFSORT Development

IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on 
10/21/2014 10:54:39 PM:

 From: Thomas Berg thomas.b...@swedbank.se
 To: IBM-MAIN@LISTSERV.UA.EDU
 Date: 10/21/2014 10:56 PM
 Subject: DFSORT/ICETOOL pondering
 Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU
 
 Sometimes I have a need to do a selective copy of a dataset where 
 the selection is both record sequence and record position/part 
dependent. 
 And by that I mean the record part/position is varying depending on 
 which record it's about. 
 An example (yes, it looks silly):
 
 I want to copy  position 31 to 40 of all records but from record 8 
 and 9 I want to copy also (concatenate) position 71 to 80 and from 
 record 6 to 8 I also (concatenate in front) want to copy position 1 to 
3. 
 The point of this example is to illustrate the needs of a more 
 general solution. 
 
 I can see the use of the SUBSET (ICETOOL) for record selection but 
 how do you user DFSORT/ICETOOL to solve the combining record and 
 varying position needs ? 
 I now use a homegrown program for this but it's lacking efficiency 
 to say the least and I'm looking at DFSORTs efficiency and speed. 
 
 I have been looking at OUTFIL/OUTREC etc. but I can't see a straight
 forward and general solution/template. 
 I'm hoping for someone who have done this before to supply an example. 
 
 
 
 Best Regards,
 Thomas Berg
 ___ 
 Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DFSORT/ICETOOL pondering

2014-10-22 Thread Alfred Cole
Thomas,

In the example that you stated, 
1. are the records apart of a set of records
2. does each record have a unique identifier and sequence key.

If so, the you could extract records 8 and perform a specific operations and
then resort the records back into the record set.



-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Sri h Kolusu
Sent: Wednesday, October 22, 2014 11:12 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: DFSORT/ICETOOL pondering

Thomas,

I do think it is possible to reformat the selective data using symbols from
various positions of the record. Are we dealing with FB file or VB files ?
Regarding the concatenation of data, do you always want to combine 2 records
data into a single record? It would be great if you can show us a sample
data and desired output with the DCB properties of the input and output
files.
 
Thanks,
Kolusu
DFSORT Development

IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on
10/21/2014 10:54:39 PM:

 From: Thomas Berg thomas.b...@swedbank.se
 To: IBM-MAIN@LISTSERV.UA.EDU
 Date: 10/21/2014 10:56 PM
 Subject: DFSORT/ICETOOL pondering
 Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU
 
 Sometimes I have a need to do a selective copy of a dataset where the 
 selection is both record sequence and record position/part
dependent. 
 And by that I mean the record part/position is varying depending on 
 which record it's about.
 An example (yes, it looks silly):
 
 I want to copy  position 31 to 40 of all records but from record 8 and 
 9 I want to copy also (concatenate) position 71 to 80 and from record 
 6 to 8 I also (concatenate in front) want to copy position 1 to
3. 
 The point of this example is to illustrate the needs of a more general 
 solution.
 
 I can see the use of the SUBSET (ICETOOL) for record selection but how 
 do you user DFSORT/ICETOOL to solve the combining record and varying 
 position needs ?
 I now use a homegrown program for this but it's lacking efficiency to 
 say the least and I'm looking at DFSORTs efficiency and speed.
 
 I have been looking at OUTFIL/OUTREC etc. but I can't see a straight 
 forward and general solution/template.
 I'm hoping for someone who have done this before to supply an example. 
 
 
 
 Best Regards,
 Thomas Berg
 ___ 
 Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions, send 
 email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
 

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


DFSORT/ICETOOL pondering

2014-10-21 Thread Thomas Berg
Sometimes I have a need to do a selective copy of a dataset where the selection 
is both record sequence and record position/part dependent. 
And by that I mean the record part/position is varying depending on which 
record it's about.  
An example (yes, it looks silly):

I want to copy  position 31 to 40 of all records but from record 8 and 9 I want 
to copy also (concatenate) position 71 to 80 and from record 6 to 8 I also 
(concatenate in front) want to copy position 1 to 3.  
The point of this example is to illustrate the needs of a more general 
solution. 

I can see the use of the SUBSET (ICETOOL) for record selection but how do you 
user DFSORT/ICETOOL to solve the combining record and varying position needs ? 
I now use a homegrown program for this but it's lacking efficiency to say the 
least and I'm looking at DFSORTs efficiency and speed.

I have been looking at OUTFIL/OUTREC etc. but I can't see a straight forward 
and general solution/template.  
I'm hoping for someone who have done this before to supply an example.  



Best Regards,
Thomas Berg
___ 
Thomas Berg   Specialist   zOS/RQM/IT Delivery   Swedbank AB (Publ)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN