ICETOOL extract fields from input dsn and copy to an output dsn

3740 views
Skip to first unread message

af dc

unread,
Feb 9, 2012, 6:46:48 AM2/9/12
to
Hello,
I'm hanging around with this task and I'm getting what I want, can you pls
give me an help ??

>> input dsn:
Organization . . . : PS
Record format . . . : VB
Record length . . . : 7004
Block size . . . . : 27998

>> input dsn:
MVST E TI02AA.REPTEXT.NOTOK2.MCGRID Line 00000000 Col 001
080
Command ===> Scroll ===>
CSR
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data
**********************************
D EXPBD.BACKUP.BDPADM01.ESP09000.G6087V00 2011/04/18203146MVS2
2011/08/
D EXPBD.BACKUP.BDPADM01.ESP09000.G6088V00 2011/04/19202910MVS2
2011/08/

on the output dsn I want to get only the dsn field.

I'm using ICETOOL with:
//TOOLIN DD *
*
COPY FROM(INDD) TO(OUT1) USING(COP1)
*
//COP1CNTL DD *
SORT FIELDS=COPY
OUTREC FIELDS=(9,40)
and I'm getting:

ICE146I 0 END OF STATEMENTS FROM COP1CNTL - PARAMETER LIST STATEMENTS
FOLLOW
DEBUG NOABEND,ESTAE

OPTION
MSGDDN=DFSMSG,LIST,MSGPRT=ALL,RESINV=0,SORTDD=COP1,SORTIN=INDD,
ORTOUT=OUT1,DYNALLOC

SORT FIELDS=COPY

ICE201I H RECORD TYPE IS V - DATA STARTS IN POSITION 5

ICE251A 0 MISSING RDW OR DATA FOR *OUTREC : REASON CODE 03, IFTHEN 0


What am I missing ??
Many thx, A.Cecilio.

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

Mike Wood

unread,
Feb 9, 2012, 7:53:24 AM2/9/12
to
Antonio, Look to this section "Producing Commands and Reports from the Extract Data Set" in the rmm Reporting book. It even has examples of OUTREC - that include the "1,4" which is required when using Variable length records.

Two similar examples in SAMPLIB - EDGJBCAV and EDGJRECV.

Mike Wood

Sambataro, Anthony [E] , NIH/NBS

unread,
Feb 9, 2012, 7:53:39 AM2/9/12
to
Have you looked at the VTOF parameter? Something like:

OUTREC FIELDS=(9,40),VTOF

Frank Yaeger

unread,
Feb 9, 2012, 12:58:41 PM2/9/12
to
af dc at IBM Mainframe Discussion List <IBM-...@bama.ua.edu> wrote on
02/09/2012 03:45:23 AM:
> From: af dc <acb...@GMAIL.COM>
> To: IBM-...@bama.ua.edu
> Date: 02/09/2012 03:47 AM
> Subject: ICETOOL extract fields from input dsn and copy to an output dsn
> Sent by: IBM Mainframe Discussion List <IBM-...@bama.ua.edu>
>
> Hello,
> I'm hanging around with this task and I'm not getting what I want, can
you pls
> give me an help ??
>
> >> input dsn:
> Organization . . . : PS
> Record format . . . : VB
> ...
> I'm using ICETOOL with:
> //TOOLIN DD *
> *
> COPY FROM(INDD) TO(OUT1) USING(COP1)
> *
> //COP1CNTL DD *
> SORT FIELDS=COPY
> OUTREC FIELDS=(9,40)
> and I'm getting:
>
> ICE251A 0 MISSING RDW OR DATA FOR *OUTREC : REASON CODE 03, IFTHEN 0
>
>
> What am I missing ??

As indicated by the ICE251A message, you're missing the RDW in the
OUTREC statement.

You have a VB input file, but you're treating it like an
FB input file.

If you want a VB output file, you can use a
DFSORT/ICETOOL job like the following:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//INDD DD DSN=.... input file (VB)
//OUT1 DD DSN=... output file (VB)
//TOOLIN DD *
COPY FROM(INDD) TO(OUT1) USING(COP1)
*
//COP1CNTL DD *
SORT FIELDS=COPY
OUTREC BUILD=(1,4,9,40)
/*

Note that you must specify the RDW (1,4) in OUTREC.

If you want an FB output file, you can use
a DFSORT/ICETOOL job like the following:

//S2 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//INDD DD DSN=.... input file (VB)
//OUT1 DD DSN=... output file (FB)
//TOOLIN DD *
COPY FROM(INDD) USING(COP1)
*
//COP1CNTL DD *
SORT FIELDS=COPY
OUTFIL FNAMES=OUT1,BUILD=(9,40),VTOF
/*

Note the use of VTOF.

Frank Yaeger - DFSORT Development Team (IBM) - yae...@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration

=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

af dc

unread,
Feb 9, 2012, 3:01:51 PM2/9/12
to
Hi all,
got it, thx very much, A.Cecilio
Reply all
Reply to author
Forward
0 new messages