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
 

 

Conversion of a VB file to FB.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
isssal

New User


Joined: 29 Oct 2016
Posts: 1
Location: usa

PostPosted: Mon Oct 31, 2016 10:23 pm    Post subject: Conversion of a VB file to FB.
Reply with quote

I have tried just about each and every example in this forum but I come up short.
As always the obvious eludes me. .

I have to copy all the records from a VB file DCB=RECFM=VB,LRECL=23036,BLKSIZE=27998)
to a FB file(LRECL=132).
I need to copy only first 132 positions from input file, for each input record.

I am using SORT utility with following this code:


Code:
Code:
//SORT1    EXEC PGM=SORT,REGION=8000K                 
//SORTLIB  DD DSN=SYS1.SORTLIB,DISP=SHR               
//SYSOUT   DD SYSOUT=*                               
//SRTPRINT DD SYSOUT=*                               
//SYSERRBK DD SYSOUT=*                               
//SYSUDUMP DD SYSOUT=*                               
//*                                                   
//SORTWK01 DD UNIT=3380,SPACE=(CYL,(300,100),RLSE)   
//SORTWK02 DD UNIT=3380,SPACE=(CYL,(300,100),RLSE)   
//*       
//SORTCKPT DD DUMMY
//*                                                                               
//*                                                                     
//SORTIN   DD  DSN=T.XMIT.IN.TREAS.DLY3.R161014.C004001.IS1610,         
//             DCB=(RECFM=VB,LRECL=23036,BLKSIZE=27998),               
//             DISP=SHR                                                 
//*                                                                     
//SORTOUT  DD  DSN=T.BRC.TREAS.IIDSRT3.R161014.S1,                     
//             DISP=(NEW,CATLG,DELETE),                                 
//             SPACE=(TRK,(50,150),RLSE),                               
//             DCB=(RECFM=FB,LRECL=132,BLKSIZE=132)                     
//*                                                                     
//SYSIN    DD *                                                         
   SORT FIELDS=COPY                                                     
      OUTFIL VTOF,BUILD=(5,132)                                         
//*                                     


iNPUT FILE: vb
Code:
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6--
****** ***************************** Top of Data ********************
000001  RUN DATE =    10/13/2016                              Ixy VAL
000002                                                               
000003   Dept FILE DSN: XYYYY                                       
000004      xONTROL     AGENCY         AGENCY        ALC          SCH
000005      NUMBER        ID          FILETYPE      NUMBER         NU
000006      d000001       xyz         Ixy xyz      00000001         
000007                                               Accumulated Paym
000008                                                Reported Totals
000009                                                     File Is Ac
000010    0    Invalid                           1st occurrence on pa
****** **************************** Bottom of Data
******************

File portion to the right:

Code:
01.IS1610     Columns 22961 [b]23032 [/b]
                 Scroll ===> CSR 
-0----+----1----+----2----+----3--
ata ******************************


What I need is a FB file of LRECL of 132. Nice report portion.




What I get is one record: lOOKS LIVE THE FIRST 4 BYTES OF THE vb REC
Code:
=COLS> ----+----1----+----2----+----3----+----4----+----5----+
****** ***************************** Top of Data *************
000001   V  ß8 iRUN DATE = i10/13/2016 mITS VALIDATION REPORT
****** **************************** Bottom of Data ***********

014.S1                  Columns 00061 00132
                           Scroll ===> CSR 
-9----+----0----+----1----+----2----+----3--
* Top of Data ******************************
ACH'߶ ¥DEPT      FILE DSN: XYZT.IN.TEST.DLYX3.

 Bottom of Data ****************************





OTHER PERTINENT INFO FOR input FILE:
Code:


 General Data                         
  Management class . . :       
  Storage class  . . . :       
  Volume serial . . . :         
  Device type . . . . :           
  Data class . . . . . : NULL         
  Organization  . . . : PS           
  Record format . . . : VB           
  Record length . . . : 23036         
  Block size  . . . . : 27998         
  1st extent blocks . : 2             
  Secondary blocks  . : 1             
  Data set name type  :               
                                     
                                     
  SMS Compressible  . : NO           


                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
 Data ****************************




TKS IN ADVANCE.

I HAVE BEEN READING AND I WILL KEEP ON READING:
Read more: http://ibmmainframes.com/about41957.html#ixzz4OgE8Ugy6
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Mon Oct 31, 2016 11:49 pm    Post subject: Reply to: Conversion of a VB file to FB.
Reply with quote

Code:
 OUTFIL VTOF,
        IFTHEN=(WHEN=INIT,
                 OVERLAY=(137:X)),
        IFTHEN=(WHEN=INIT,
                 BUILD=(5,132))


That will extend all our records (if needed) to 132 bytes of data. The 137th byte of the input (which you don't need) is clobbered to space. Anything from the original end of record up to the 137th position will be padded with blanks.

You can then use the 132 bytes of data, which will contain trailing spaces, not parts of the next records as you've done so far.

Probably the LRECL is a red-herring. You've probably just got print lines without trailing spaces.
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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