Posted: Fri May 25, 2012 5:01 pm Post subject: Copying a VB record when certain conditions are met
I am trying to copy an entire VB record when certain conditions are met. It seems that I am only copy the data portion and not the 1st 4 bytes of the VB record. I am missing a small detail probably. Statements below: FILE FILEA
FA-ARG 01 06 N
FILE FILEB VB (1035 1039)
IN-REC 01 1035 A
REC-TYP 71 1 A
FB-ARG 325 06 N
FILE MTCHOUT VB (1035 1039)
OUT-REC 01 1035 A
JOB INPUT (FILEA KEY(FA-ARG) +
IF MATCHED AND REC-TYP = 'L'
OUT-REC = IN-REC
Yes. When I look at the input file all the way to the right it has 4 more columns ("Col") than the output record. Also, subsequent processing is not working I believe due to the data being 4 positions off.
I have not tried the SORT program since it looked more complicated. With File Aid I am trying to read 1 file (FILE A) which has only 1 record and use the 1st 6 bytes to select records from FILE B. This part is working. My only problem is when the selected records are copied from the FILE B to the FILE MTCHOUT, output file FILE MTCHOUT drops the last 4 bytes of the file. I am not familiar with using variable block files in File Aid. My LRECL is 1039 and the 1st 4 are the RDW. So how do I specify that in File Aid and write the entire 1039 to the output file ?
That is what I thought but it is not working. I must not be specifying something correctly in the statements. I have tried saying the record is 1035 in length and 1039 in length and neither works for me.
I did look at your previous reply and tried some of it and it didn't work. I am sorry that I am in the File Aid section here when (you are right) it is Easytrieve. My mistake. I will cease and desist with this and go to the Easytrieve postings.
You need to STOP posting "it didn't work" as this is totally useless for getting help . . .
When something does not work, you need to post the statement(s) used, the jcl, and the diagnostic info from the run (only the parts that are relevant). If the data created is not what you expect, show the data (in hex) for a record or 2. If the records are quite long, only post the parts that demonstrate the problem.
Originally a bit of code was posted, but as experiments were tried, the output from these (and the modified code) is needed for us to help.
Your duplicate post has been removed - this topic and all of the dialog are now in the Easytrieve part of the forum. _________________ Have a good one
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