Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Copy from VB to FB with added sequence number

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
bommu

New User


Joined: 15 Dec 2006
Posts: 3
Location: India

PostPosted: Thu Sep 24, 2015 2:14 am    Post subject: Copy from VB to FB with added sequence number
Reply with quote

Hi,

I have a input variable file with length of 450(446+4). My requirement is to copy it to a fixed output file with added sequence number for first 8 bytes. I used below code in SORT step, but it is giving me error. Please advise.

INREC BUILD=(SEQNUM,8,ZD,9:1,446)
SORT FIELDS=COPY

Error is below
ICE201I H RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE251A 2 MISSING RDW OR DATA FOR *INREC : REASON CODE 05, IFTHEN 0

Even I tried with below code, getting same error.

INREC BUILD=(SEQNUM,8,ZD,9:5,446)
SORT FIELDS=COPY
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Sep 24, 2015 3:30 am    Post subject: Reply to: Copy from VB to FB with added sequence number
Reply with quote

If your input is variable-length and you want the output fixed, you need to convert it.

This is done on OUTFIL, using VTOF. You can also specify the BUILD there.

Code:
BUILD=(SEQNUM,8,ZD,5,446)
Back to top
View user's profile Send private message
bommu

New User


Joined: 15 Dec 2006
Posts: 3
Location: India

PostPosted: Thu Sep 24, 2015 9:45 pm    Post subject: Reply to: Copy from VB to FB with added sequence number
Reply with quote

Thanks for your info.

I tried with below code, still getting error. Kindly advise.

SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,VTOF,BUILD=(SEQNUM,8,ZD,1:5,446)


error:
ICE126A 9 INCONSISTENT REFORMATTING FOR SORTOUT : REASON CODE 04, IFTHEN 0
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Sep 24, 2015 10:00 pm    Post subject: Reply to: Copy from VB to FB with added sequence number
Reply with quote

Did you look up the message, and see what the reason-code (4) means?

This is what I suggested:

Code:
 BUILD=(SEQNUM,8,ZD,5,446)


That says, "put an 8-digit zoned-decimal sequence number, and follow it with data from the first data-position (5) for a length of 446).

This is what you coded:

Code:
 BUILD=(SEQNUM,8,ZD,1:5,446)


This says, "put an 8-digit zoned-decimal sequence number, and immediately, illegally, try to squish it with the data by attempting to put it at column one".
Back to top
View user's profile Send private message
bommu

New User


Joined: 15 Dec 2006
Posts: 3
Location: India

PostPosted: Thu Sep 24, 2015 10:22 pm    Post subject: Reply to: Copy from VB to FB with added sequence number
Reply with quote

Hi Bill, It is working fine now. Thank you.

Previously I was making some changes and I overlooked at your code. My apologies.

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

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 1 Fri Nov 17, 2017 9:49 am
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us