View previous topic :: View next topic
|
Author |
Message |
Mohankalyan99
New User
Joined: 06 Apr 2005 Posts: 16
|
|
|
|
Need help on how to insert a string/value into a VB file.
I'm using OUTREC FIELDS cmd to insert, but its giving error.
Here is my cmd
Code: |
OPTION COPY
OUTREC FIELDS=(1:1,4,5:5,22,C'008002324930',38:27,549)
|
Thanks
Kalyan |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Please show the //SYSOUT messages so we don't have to guess what the error is. |
|
Back to top |
|
|
Mohankalyan99
New User
Joined: 06 Apr 2005 Posts: 16
|
|
|
|
Here is the Sysout of the error:
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 10:31 ON MON JUN
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,4,5:5,22,C'008002324930',38:27,549)
ICE201I 0 RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE126A 0 INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND
ICE052I 3 END OF DFSORT |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Mohankalyan99
Quote: |
ICE126A 0 INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND
|
This may be because of overlapping column's.
Just check with this
Code: |
OPTION COPY
OUTREC FIELDS=(1:1,4,5:5,22,C'008002324930',39:27,549)
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Mohankalyan99,
Krisprems is right. The problem is that your constant ends in output position 38, but you specified 38: for the next output position. The next output position should start at 39, but if you want the input positions from 27 to the end of the record to follow your constant, you should use 39:27 rather than 39:27,549. If you use 39:27,549 and you have any "short" input records, DFSORT will terminate. With 39:27 (no length) DFSORT will not terminate. So the correct OUTREC statement would be:
Code: |
OUTREC FIELDS=(1:1,4,5:5,22,C'008002324930',39:27)
|
|
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
thanks for correcting me frank,
i was not aware of DFSORT terminating because of SHORT input records:-( |
|
Back to top |
|
|
Mohankalyan99
New User
Joined: 06 Apr 2005 Posts: 16
|
|
|
|
Did a small mistake..
After using 39 as output position, it worked.
Thanks for all who gave inputs to me. |
|
Back to top |
|
|
|