|
|
| Author |
Message |
rguhanath
Active User
Joined: 16 Oct 2006 Posts: 56 Location: chennai
|
|
|
|
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 |
|
 |
References
|
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4684 Location: San Jose, CA
|
|
|
|
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 |
|
 |
rguhanath
Active User
Joined: 16 Oct 2006 Posts: 56 Location: chennai
|
|
|
|
Thanks Frank... its working...
-Nath R |
|
| Back to top |
|
 |
|
|
|