Posted: Thu Mar 13, 2003 11:10 am Post subject: VB to multiple FB as per given condition
Hi,
I am very sorry if this topic had discussed earlier. I have checked it out with search option, but I did not get what I want.
Here is my question. The content of my VB file looks like,
F0004A001<data content>
F0004A001<data content>
F0005A001<data content>
F0005A002<data content>
This will continue until F0100(All these rec's would not be in sequence)
Now I wanted to the rec's starting with F0004 are all in one file, F0005 in one file and so on. All these files have to be in FB.
I have tried and found that it is working. But I have one question. If OUTREC fields are starting from 5 and how come the outer limit is 2049? It should be 2053. Isn't it?
Other thing is, during the copy I do not want the file name(for ex: F0004)to be copied to output file. It has to be ignored. Could you tell me how do I ignore this?
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Mar 13, 2003 12:38 pm Post subject:
Kannan,
The first 4 bytes in variable block file is the RDW.so in your case you said that the lrecl is 2053 including rdw , so I subtracted the 4 bytes from it.
For omitting the file name change your sysin cards as follows:
WER161B ALTERNATE PARM USED
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
I forgot to tell you one thing that other than the file name, A0001 and A0002 (you can see these values in my input) are also have to be ignored. I tried with
SORT FIELDS=COPY
OUTREC FIELDS=(5,2049),CONVERT
OUTFIL FILES=01,INCLUDE=(1,5,CH,EQ,C'F0004'),
OUTREC=(14,2040) ----------> incremented to ignore A001
OUTFIL FILES=02,INCLUDE=(1,5,CH,EQ,C'F0005'),
OUTREC=(14,2040)
END
I am keep trying. If you have any ideas, please let me know.
Thanks again, Kannan
I got it . I have given a space in outrec(OUTREC =(14,2040)). That's where the problem and other thing is, in every FB OUTREC, it is required to give the exact lrecl. This is also corrected and it is working fine now.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum