I want to check the GRAND TOTALS .00 if it is GRAND TOTALS .00 than we have to add "No Data" in line 5 and we are also adding HEADER1& TRAILER1 in report And if GRAND TOTALS .00 not than it will simply add HEADER1& TRAILER1 in report
I want to check the GRAND TOTALS .00 if it is GRAND TOTALS .00 than we have to add "No Data" in line 5 and we are also adding HEADER1& TRAILER1 in report And if GRAND TOTALS .00 not than it will simply add HEADER1& TRAILER1 in report
000001 1 3/15/2023
000002 RECORDS CHANGED
000003
000004 0p NO. PRE PM
000005
000006 1 3/15/2023
000007 RECORDS CHANGED
000008
000009 0 NO. PRE PM
000010
000011 GRAND TOTALS .00
000012
than Expected o/p
Code:
000001 BEGIN
000002 KEY2
000003 LOB
000004 BEGIN
000005 KEY A3
000006 1 3/15/2023
000007 RECORDS CHANGED
000008
000009 0p NO. PRE PM
000010 No Data
000011 1 3/15/2023
000012 RECORDS CHANGED
000013
000014 0 NO. PRE PM
000015
000016 GRAND TOTALS .00
000017
000018 END
000019 END
And if we give i/p this
Code:
000001 1 3/15/2023
000002 RECORDS CHANGED
000003
000004 0p NO. PRE PM
000005 8754 88 63 91
000006 1 3/15/2023
000007 RECORDS CHANGED
000008
000009 0 NO. PRE PM
000010 88 63 91
000011 GRAND TOTALS 63.00
000012
Than Expected o/p
Code:
000001 BEGIN
000002 KEY2
000003 LOB
000004 BEGIN
000005 KEY A3
000006 1 3/15/2023
000007 RECORDS CHANGED
000008
000009 0p NO. PRE PM
000010 8754 88 63 91
000011 1 3/15/2023
000012 RECORDS CHANGED
000013
000014 0 NO. PRE PM
000015 88 63 91
000016 GRAND TOTALS 63.00
000017
000018 END
000019 END
And if i want to skip all records or delete the entire record when INREC or OUTREC condition satisfies??
Then you need to add appropriate parameters to corresponding statements.
Do you suggest me to do it instead of you?
rajesh7523 wrote:
In above i/p file, condition is checking if GRAND TOTAL 00
then only we are skipping or deleting entire records
Wrong. GRAND TOTAL 00 is checked to find the group where to add your special comment.
rajesh7523 wrote:
I i/p file format is VBA
let me know the logic
The logic (e.g. algorithm) does not depend on record format (which is also not FILE FORMAT!!!!)
You MUST try to understand the suggested logic for RECFM=FB yourself.
Next step would be - updating some parameters (not logic!) to handle RECFM=VB/VBA