M
Member 310024
Guest
Environment: IBM Z series mainframe MVS COBOL/DB2 & MSWXP MS COBOL 2.4?.
I am unload records out of a DB2 table into a TSO dataset.
I then FTP the dataset to a PC.
The problem is that sometime there are non-printable
characters (NPC's) in field that come off the data-base and into the TSO-DS.
Normally I would check the TSO-DS with ISPF TSO editor (=2 option) and if there were non printable chars, there would be a message about using p'.' to find & change them.
I would normally change them to the underscore chjaracter.
I should have mentioned that I convert all numeric data into display format eg PIC 9(9).99- for example, and that the problem is not with numeric format data - it's with NPC's in PIC X fields. If the extract file is relatively small, it's no big deal to use the mainframe editor to do the change I have already described.
(By the way, the the NPC's are not supposed to be present, but getting the O/S company to tighten up their application is not going to happen)
Sometimes I might have over 1M records and it's to big for the editor.
What I need to do is to examine each record after by FETCH and before I load it into the sequential record.
What is the simplest and most generic means of doing this.
My dream would be something like
INSPECT DD-TABLE-FIELD (i.e. the group field containing all the fields of the SELECT/INTO clause).
REPLACING ALL NPC's (ie see p'.' values) BY '_'.
I want to avoid, if I can, having elaborate tables or scans if I can.
If I don't do this, the FTP (that I use anyway) will shift
all characters after the NPC, 1 character position to the left, which in turn means that the subsequent fields would be offset by 1 char posn, meaning the pic('s would now contain non-numeric chars and the pic x's would contain bits of other fields.
So then, when I upload from the PC seq file into the PC COBOL ISAM file, I will get a run time error when numeric data is tried to be loaded into a numeric field.
Thanks in anticipation for any good ideas.
I am unload records out of a DB2 table into a TSO dataset.
I then FTP the dataset to a PC.
The problem is that sometime there are non-printable
characters (NPC's) in field that come off the data-base and into the TSO-DS.
Normally I would check the TSO-DS with ISPF TSO editor (=2 option) and if there were non printable chars, there would be a message about using p'.' to find & change them.
I would normally change them to the underscore chjaracter.
I should have mentioned that I convert all numeric data into display format eg PIC 9(9).99- for example, and that the problem is not with numeric format data - it's with NPC's in PIC X fields. If the extract file is relatively small, it's no big deal to use the mainframe editor to do the change I have already described.
(By the way, the the NPC's are not supposed to be present, but getting the O/S company to tighten up their application is not going to happen)
Sometimes I might have over 1M records and it's to big for the editor.
What I need to do is to examine each record after by FETCH and before I load it into the sequential record.
What is the simplest and most generic means of doing this.
My dream would be something like
INSPECT DD-TABLE-FIELD (i.e. the group field containing all the fields of the SELECT/INTO clause).
REPLACING ALL NPC's (ie see p'.' values) BY '_'.
I want to avoid, if I can, having elaborate tables or scans if I can.
If I don't do this, the FTP (that I use anyway) will shift
all characters after the NPC, 1 character position to the left, which in turn means that the subsequent fields would be offset by 1 char posn, meaning the pic('s would now contain non-numeric chars and the pic x's would contain bits of other fields.
So then, when I upload from the PC seq file into the PC COBOL ISAM file, I will get a run time error when numeric data is tried to be loaded into a numeric field.
Thanks in anticipation for any good ideas.