IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

VBA to FB conversion


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Wed Feb 20, 2008 2:48 am
Reply with quote

I need to copy a 25 length field from 17th position of a VBA type file containing only 1 record onto another file with RECFM as FM and LRECL 80.

I am facing problem while using OUTREC fields statement.
The statement used by me is
Code:

//JS0020   EXEC  PGM=SORT                         
//*                                               
//SORTIN  DD DSN=ECSA82T.PRAVEEN.SORT1,DISP=SHR   
//SORTOUT DD DSN=ECSA82T.PRAVEEN.SORT2,           
//           DISP=(OLD,CATLG,DELETE),             
//           UNIT=DISK,                           
//           DCB=(RECFM=VBA,LRECL=80),           
//           SPACE=(TRK,(10,10),RLSE)             
//SYSIN   DD *                                   
     SORT FIELDS=COPY                             
     OUTREC FIELDS=(1:C'D',17,25)                 


The error message is

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
Back to top
View user's profile Send private message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Wed Feb 20, 2008 3:01 am
Reply with quote

When the same conversion is tried with this code the abend details are as follows

Code:

//JS0020   EXEC  PGM=SORT                                             
//*                                                                   
//SORTIN DD  DSN=ECSA82T.PRAVEEN.SORT1,DISP=SHR                       
//SORTOUT DD DSN=ECSA82T.PRAVEEN.SORT3,DISP=(NEW,CATLG),               
//           UNIT=SYSDA,SPACE=(CYL,1),DCB=(RECFM=FB)                   
//SYSIN DD  *                                                         
 SORT FIELDS=COPY                                                     
 OUTREC FIELDS=(17,25,55X),CONVERT                                     
//EZTVFM DD UNIT=DISK,SPACE=(4096,(100,100))                           
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT DD SYSOUT=*                                                   


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
--------------------------------------------------------------------------
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Feb 20, 2008 3:15 am
Reply with quote

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:

Code:

//JS0020   EXEC  PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN  DD DSN=ECSA82T.PRAVEEN.SORT1,DISP=SHR   (VBA)
//SORTOUT DD DSN=ECSA82T.PRAVEEN.SORT2,
//           DISP=(OLD,CATLG,DELETE),
//           UNIT=DISK,
//           RECFM=FM,
//           SPACE=(TRK,(10,10),RLSE)
//SYSIN   DD *
   SORT FIELDS=COPY
   OUTFIL VTOF,BUILD=(1:C'D',22,25,80:X)
/*


Notice that I used 22 instead of 17. I added 5 for the RDW (+4) and cc (+1) since I figure you didn't count those.
Back to top
View user's profile Send private message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Wed Feb 20, 2008 3:29 am
Reply with quote

Hi Frank,
Thanks for ur immediate reply..

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

Pls help me in this issue
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Feb 20, 2008 3:50 am
Reply with quote

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:

Code:

   SORT FIELDS=COPY
   OUTFIL CONVERT,OUTREC=(22,25,80:X)
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Feb 20, 2008 3:55 am
Reply with quote

Code makes it so much clearer....
Code:
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
Back to top
View user's profile Send private message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Wed Feb 20, 2008 3:58 am
Reply with quote

Can I have a code which converts a file from VBA format to FB format
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Feb 20, 2008 4:14 am
Reply with quote

dadiprav wrote:
Can I have a code which converts a file from VBA format to FB format
Did you look at Frank's last post?
Frank Yaeger wrote:
In the meantime, see if this older version of the operands works for you:

Code:

   SORT FIELDS=COPY
   OUTFIL CONVERT,OUTREC=(22,25,80:X)
Back to top
View user's profile Send private message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Wed Feb 20, 2008 6:27 am
Reply with quote

Thanks a lot Frank..
It worked....
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts SMF Record Date conversion failing CLIST & REXX 1
No new posts Assembler class assignment: stuck on ... PL/I & Assembler 12
Search our Forums:

Back to Top