Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How covert VB to FB while using PARSE in INREC statement.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
rguhanath

Active User


Joined: 16 Oct 2006
Posts: 55
Location: chennai

PostPosted: Sat May 17, 2008 4:57 pm    Post subject: How covert VB to FB while using PARSE in INREC statement.
Reply with quote

Hi All,

i have a requirement like i have two files one is input file(VB format, have length 458) and i need to adjust the fields in the records using PARSE in INREC statement like below(for example). while doing this i want the output file in FB format with length 454.

Example ( taken from previous scraps...)
Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB)
//SORTOUT DD DSN=...  output file (FB)
//SYSIN    DD    *
  OPTION COPY
  INREC PARSE=(%00=(ENDBEFR=C';',FIXLEN=10),
               %01=(ENDBEFR=C';',FIXLEN=10),
               %02=(FIXLEN=10)),
        BUILD=(1:%00,25:%01,41:%02,JFY=(SHIFT=RIGHT))
/*



in the above example it shows from FB to FB, but i want VB to FB with using above code. please help me.

Regards,
Nath R.
Back to top
View user's profile Send private message
References
PostPosted: Sat May 17, 2008 4:57 pm    Post subject: Re: How covert VB to FB while using PARSE in INREC statement. Reply with quote

Frank Yaeger

DFSORT Moderator


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

PostPosted: Sat May 17, 2008 8:46 pm    Post subject:
Reply with quote

You can use a DFSORT job like the following to do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB/458)
//SORTOUT DD DSN=...  output file (FB/454)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL VTOF,
    PARSE=(%00=(ENDBEFR=C';',FIXLEN=10),
           %01=(ENDBEFR=C';',FIXLEN=10),
           %02=(FIXLEN=10)),
    BUILD=(1:%00,25:%01,41:%02,JFY=(SHIFT=RIGHT),454:X)
/*
Back to top
View user's profile Send private message
rguhanath

Active User


Joined: 16 Oct 2006
Posts: 55
Location: chennai

PostPosted: Sun May 18, 2008 7:35 pm    Post subject:
Reply with quote

Thanks Frank... its working...

-Nath R
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1