I have one sort card which will validate the binary and PD fields for less than 0 and non numeric(for PD) and write the records in the output file with description.Now its working fine if each record has one invalid field.
Now my requirement is if any one record has 2 invalid fields it should be written 2 times in the output file with description(negative or non-numeric).
Also please help me out writing the header for the above records.I am using the below one
HEADER1=('KEY FIELD ********************************************',
Telling us what you did that didn't work without explaining what you're trying to do is really not very helpful.
You need to start over and explain clearly what it is you're trying to do.
Please show an example of the records in your input file (relevant fields only) and what you expect for output. Include the cases that aren't working. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files.
Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:
Please find below the //SYSOUT messages for the job you have given
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 40BE0, MODEL 2817 735
WER276B SYSDIAG= 2467164, 4229465, 4229465, 1889100
WER164B 6,884K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 272K BYTES USED
WER146B 32K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER410B 5,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 156K BYTES USED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B BSAM WAS USED FOR SORTIN
WER416B BSAM WAS USED FOR SORTOUT
WER054I RCD IN 1, OUT 1
Coming to my requirement:
I have a file having records with 4 comp and 6 comp-3 fields.I have to validate these fields for negative,non-numeric(for PD) and build the output as a report showing the discrepancy.
Please find the sample records in my file.
BI BI BI BI PD PD PD PD
(1-2) (3-4) (31-32) (56-57) (118-123) (124-129) (164-168) (169-170)
-7 -71 0 2010 33000.00 0 0 20
7 -72 0 -2010 50000.00 0 0 90
The record format is FB and record length is 333 bytes.
I had used the HIT=NEXT option for IFTHEN conditions ,its validating the next field of the same record but overriding on the same record in the output.
Please let me know is there any way to build the same record as many times as the no. of invalid fields in it(2 invalid fields means it should print 2 times).
Also to count the records based on the invalid fields.
(INVALID RECS WITH DTE-MONTH 1
(INVALID RECS WITH DTE-YEAR 1)
Please let me know if you need any more details
Thanks for your time
Please let me know is there any way to build the same record as many times as the no. of invalid fields in it(2 invalid fields means it should print 2 times). Also to count the records based on the invalid fields.
It is true that using HIT=NEXT will make the subsequent IFTHEN checks also even if one IFTHEN condition is satisfied.
But YOU need to take care of not losing the data already OVERLAYed at some position by NOT giving the same output position in all the IFTHEN OVERLAYs.
It is not clear how your expected output should look like. It might help if you post here the expected output records for a few sample input data records.