during a couple of days' working hard, finally I find the answer:
1: at first, we need to understand 2 develop enviorment: pc/370 MVS assmbler imitator in DOS,
MVS Z/os assmbler in mainframe.
2: my code is from pc/370 in Dos;
3: for all display character, ASCII code in DOS, and EBCDIC code in MVS Mainframe.
4: in my code, the following statement is for convert report.txt from EBCDIC to ASCII
OI REPORT+10,X'08' PC/370 ONLY - Convert all
* output from EBCDIC to ASCII
5: so, when I remove the above statement, we will get the correct answer. x'14312d' will
be change to x'41d2'.
6: one more question, why do I got the following incorrect output in last test I talked about several days ago?
I will trace my code:
at first take a look main patest.prn list program as following:
000074 39 *+++++++ OPEN TEACHERS
000074 4120D118 0128 40 LA 2,TEACHERS
000078 0A01 41 SVC 1
00007A 42 *+++++++ OPEN REPORT
00007A 4120D17C 018C 43 LA 2,REPORT
00007E 0A01 290 44 SVC 1
000080 D201D1EDD1DD 01FD 01ED 45 ATEND MVC OCRLF,WCRLF
000086 46 *+++++++ PUT REPORT,OREC
000086 4120D17C 018C 47 LA 2,REPORT
00008A 4110D1DF 01EF 48 LA 1,OREC
00008E 0A06 49 SVC 6
000090 F242D1DFD1E7 01EF 01F7 50 PACK ONN,OZZ
000096 51 *+++++++ PUT REPORT,OREC
♀ PATEST PAGE 2
PC/370 CROSS ASSEMBLER OPTIONS=LXACE
LOC ADR1 ADR2 LINE LABEL OP OPERANDS
000096 4120D17C 018C 52 LA 2,REPORT
00009A 4110D1DF 01EF 53 LA 1,OREC
00009E 0A06 54 SVC 6
0000A0 55
0000A0 56 *
0000A0 57 * EOJ processing
0000A0 58 *
0000A0 59 *+++++++ CLOSE TEACHERS
0000A0 4120D118 0128 60 LA 2,TEACHERS
0000A4 0A02 61 SVC 2
0000A6 62 *+++++++ CLOSE REPORT
..........
.........
0001ED 0D25 109 WCRLF DC X'0D25' PC/
370 ONLY - EBCDIC CR/LF
0001EF 110 * Output (line) definition
0001EF 111 *
0001EF 112 OREC DS 0CL16
0001EF F1F0F6F3F9 113 ONN DC CL5'10639'
0001F4 5C5C5C 114 DC CL3'***'
0001F7 14312D 115 OZZ DC PL3'-14312'
0001FA 5C5C5C 116 DC CL3'***'
0001FD 117 OCRLF DS CL2 PC/
370 only - CR/LF
000000 118 END BEGIN
**********************
SO, before execute the following SVC 6,
OZZ still is x'14312d' in memory
but, after execute SVC 6,
OZZ will be changed to x'00002D'.
I think this is the key of the problem. could you tell me what does it
means this struction: SVC 6 ; what does it do exactly? I can't check it in internet.
thank you, all,
hellen