IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to insert a string/value into a VB file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mohankalyan99

New User


Joined: 06 Apr 2005
Posts: 16

PostPosted: Mon Jun 11, 2007 9:05 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Mon Jun 11, 2007 9:30 pm
Reply with quote

Quote:
its giving error


Please show the //SYSOUT messages so we don't have to guess what the error is.
Back to top
View user's profile Send private message
Mohankalyan99

New User


Joined: 06 Apr 2005
Posts: 16

PostPosted: Mon Jun 11, 2007 11:48 pm
Reply with quote

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
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jun 12, 2007 12:41 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Jun 12, 2007 12:58 am
Reply with quote

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
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jun 12, 2007 1:03 am
Reply with quote

thanks for correcting me frank,
i was not aware of DFSORT terminating because of SHORT input records:-(
Back to top
View user's profile Send private message
Mohankalyan99

New User


Joined: 06 Apr 2005
Posts: 16

PostPosted: Tue Jun 12, 2007 4:18 am
Reply with quote

Did a small mistake..
After using 39 as output position, it worked.

Thanks for all who gave inputs to me.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Help with C character vs C string All Other Mainframe Topics 3
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top