ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 15:52 ON TUE FEB
SORT FIELDS=COPY
OUTREC FIELDS=(1:C'D',17,25)
ICE201I 0 RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE150I 0 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
ICE126A 0 INCONSISTENT REFORMATTING FIELDS FOUND
ICE052I 3 END OF DFSORT
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 16:24 ON TUE FEB
SORT FIELDS=COPY
OUTREC FIELDS=(17,25,55X),CONVERT
$
ICE215A E SPECIFIED FEATURE IS ONLY SUPPORTED BY OUTFIL STATEMENT
ICE052I 3 END OF DFSORT
--------------------------------------------------------------------------
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
To go from VBA to FM, you must use DFSORT's VTOF operand in an OUTFIL statement along with BUILD to define the fields for the output record. However, it's not really clear what you're trying to do.
You say you want to go from a VBA file to an FM file with LRECL=80, but you have RECFM=VBA,LRECL=80 for SORTOUT which would give you a VBA file for output, not an FM file.
In addition, it's not clear you understand what a VBA file or FM file looks like or which bytes you want to keep. A VBA record looks like this:
LLUUCDATA....
where LLUU is the 4-byte RDW containing the 2-byte binary length of the record and UU is two other bytes in the RDW (usually zeros). C is an ANSI carriage control character (like '1' for page eject). So the data starts in position 6, not position 1.
An FM record looks like this:
MDATA....
where M is a machine carriage control character. Machine carriage control characters are different than ANSI carriage control characters and its not clear what you want to do about this. Here the data starts in position 2.
You need something like this, but it's difficult to say exactly what you need without knowing more about what your input records look like and what you want the output records to look like:
I originally have an input file with format as VBA
This has only one record.
I need to extract a part of that file (ie from 17th position and length 25)into another file with recfm FB (I am sorry I used FM in easlier post which was a typing error).
The code given by u gave an error
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 16:51 ON TUE FEB
SORT FIELDS=COPY =*
OUTFIL VTOF,BUILD=(22,25,80:X)
$
ICE213A 0 INVALID OUTFIL STATEMENT OPERAND
ICE052I 3 END OF DFSORT
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
I can't tell if the $ is pointing to VTOF or BUILD. VTOF has been available with DFSORT since March, 2002!! BUILD has been available with DFSORT since Dec, 2004!!! Either way, your site is way, way behind on DFSORT service. Ask your System Programmer to install DFSORT R14 PTF UK90006 (it's free). That will get you all of the latest DFSORT function.
In the meantime, see if this older version of the operands works for you: