Thomas,
You can use INREC to select the data you want from various parts of the
record. It supports padding and all other functions. Why do you want to
additional syntax on the toolin and make it complex? Using INREC you
have a lot more flexibility. for example.
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
AAAAA 000001
BBBBB 000002
CCCCC 000003
DDDDD 000004
EEEEE 000005
FFFFF 000006
GGGGG 000007
HHHHH 000008
IIIII 000009
JJJJJ 000010
KKKKK 000011
LLLLL 000012
MMMMM 000013
NNNNN 000014
//OUT DD SYSOUT=*
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) INPUT KEEP RRN(3,12) USING(CTL1)
/*
//CTL1CNTL DD *
INREC BUILD=(01,7, $ COPY 6 BYTES FROM POSITION 01
30,6, $ COPY 7 BYTES FROM POSITION 30
4X, $ PAD 4 SPACES
30,6,ZD,PD,LENGTH=4, $ CONVERT ZD TO PACKED
2X, $ PAD 2 SPACES
C' THOMAS ') $ PAD CONSTANT THOMAS AT END
/*
The output would be something like this
CCCCC 000003 THOMAS
DDDDD 000004 < THOMAS
EEEEE 000005 * THOMAS
FFFFF 000006 % THOMAS
GGGGG 000007 @ THOMAS
HHHHH 000008 THOMAS
IIIII 000009 THOMAS
JJJJJ 000010 THOMAS
KKKKK 000011 THOMAS
LLLLL 000012 THOMAS
You just showed an example of 2 fields you want to pick and I am sure
others want to expand to "n" number of fields and other functions too. Why
re-invent the wheel once again when it is already available?
Thanks,
Sri Hari Kolusu
DFSORT Development
IBM Corporation
Email: [email protected]
Phone: 408-927-2187 Tie Line: 457-2187
IBM Mainframe Discussion List <[email protected]> wrote on
12/17/2014 08:52:07 AM:
> From: Thomas Berg <[email protected]>
> To: [email protected]
> Date: 12/17/2014 09:02 AM
> Subject: Suggestion for the ICETOOL SUBSET operator
> Sent by: IBM Mainframe Discussion List <[email protected]>
>
> Using the ICETTOOL SUBSET operator I missed a position subselection
> option for the FIRST/LAST/RRN parms.
> I can of course use other DFSORT operators for this purpose, but
> felt that this possibility would fit well in the SUBSET function.
>
> Example:
>
> RRN(3,12,(31:22,71:10)) or RRN(3,12,31:22,71:10)
>
> Here only the parts from position 31, length 22, and position 71,
> length 10, is selected for the
> output record. (The record will contain selected parts concatenated
> from pos 1, length 32.)
>
> Padding spec may also be added.
>
>
>
> 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 [email protected] with the message: INFO IBM-MAIN
>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN