View previous topic :: View next topic
|
Author |
Message |
shitij
New User
Joined: 09 Sep 2005 Posts: 31 Location: Delhi
|
|
|
|
Hi,
I have a task under which I need to move the fields in the file from one position to another,
say I have the following fields,
270.000
180.000
180.000
180.000
180.000
100.000
90.000
30.000
Now say I want to write these fields in another position in the following format:
00000000270000
00000000180000
00000000180000
00000000180000
00000000180000
00000000100000
00000000090000
00000000030000
I want to ask how can the program can know whether it is picking a 3 digit field or a 2 digit field or a 1 digit field?
How can a program check the fields dynamically?
If by any other method (like REXX or COBOL, which one would be more suitable), please reply. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I don't know which "program" you're asking about, but the following DFSORT job will create the output you show from the input you show:
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 FIELDS=(1,7,UFF,EDIT=(TTTTTTTTTTTTTT))
/*
|
|
|
Back to top |
|
|
|