Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

VBA to FB conversion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: VBA to FB conversion
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    Post subject: Reply to: VBA to FB conversion
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 Moderator


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

PostPosted: Wed Feb 20, 2008 3:15 am    Post subject:
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    Post subject: Reply to: VBA to FB conversion
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 Moderator


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

PostPosted: Wed Feb 20, 2008 3:50 am    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Wed Feb 20, 2008 3:55 am    Post subject: Re: Reply to: VBA to FB conversion
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    Post subject: Reply to: VBA to FB conversion
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: 2150
Location: At my coffee table

PostPosted: Wed Feb 20, 2008 4:14 am    Post subject: Re: Reply to: VBA to FB conversion
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    Post subject: Reply to: VBA to FB conversion
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm
No new posts changing z/os unicode conversion service meykh2014 All Other Mainframe Topics 0 Tue Jul 12, 2016 10:49 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us