asterisk 5c
Character Hex Equivalent 0 F0 1 F1 2 F2 3 F3 4 F4 5 F5 6 F6 7 F7 8 F8 9 F9 blank 40 comma 6b decimal point 4b asterisk 5c
EBCDIC Encoding
Character Instructions - MVC Move Characters SS1 Op2 – source field Length – associated with operand 1 only! Default Length is length of operand 1 Fields may overlap Max 256 bytes are moved
Character Instructions - MVC X DC Cl5’ABC’ Y DC CL7’1234567’ MVC X,Y MVC Y,X MVC X,=C’XYZ’ dangerous, why?
Blanking Out a Line BLANK DC C’ ’ BUFFER DS CL133 MVC BUFFER,BLANK MVI BUFFER,C’ ’ MVC BUFFER+1(L’BUFFER-1),BUFFER MVC BUFFER,=CL133’ ’
Compare Logical Characters SS1 Sets the condition code to indicate how Op1 compares to Op2 Length – associated with operand 1 only! Default Length is length of operand 1 Bytes compared using EBCDIC encoding Bytes compared left to right Max 256 bytes are compared Test with BE, BL, BH, BNE, BNL, BNH
Character Instructions - CLC X DC Cl5’ABC’ Y DC CL7’1234567 Z DC C’ABCD’ CLC X,Y CLC Y,X CLC X(2),Z explicit length CLC Z,X BL THERE
Compare Logical Immediate SI Constant resides inside the instruction Sets the condition code to indicate how Op1 compares to Op2 Implicit length of 1! Byte compared using EBCDIC encoding Test with BE, BL, BH, BNE, BNL, BNH
Character Instructions - CLI X DC Cl5’ABC’ Y DC CL7’1234567 Z DC C’ABCD’ CLI X,C’A’ Character CLI Y,C’A CLI X,X’40’ Hex CLI Z,64 Decimal CLI Z,B’11110001’ Binary BL THERE
Character Instructions - MVI Move Immediate SI Constant resides inside the instruction Implicit length of 1!
Character Instructions - MVI X DC Cl5’ABC’ Y DC CL7’1234567 Z DC C’ABCD’ MVI X,C’F’ Character MVI Y,C’A’ MVI X,X’40’ Hex MVI Z,64 Decimal MVI Z,B’11110001’ Binary
Defining an Output File ********************************************************** * * ********************************************************** FILEOUT DCB DSORG=PS, X MACRF=(PM), X DDNAME=FILEOUT, X RECFM=FBM, X LRECL=80
Defining an Input File ********************************************************** * * INPUT FILE - DATA CONTROL BLOCK * ********************************************************** FILEIN DCB DSORG=PS, X MACRF=(GM), X DDNAME=FILEIN, X RECFM=FB, X EODAD=FINAL X LRECL=80
DCB (Data Control Block) Parms MACRF=(GM) - Macro format – controls the type of macros that are used for file
- GM – input file, move mode
- GL – input file, locate mode
- PM – output file, move mode
- PL – output file, locate mode
- We will start with GM and PM since these are the easiest, but GL and PL are the most efficient for files with large record sizes and many records
DDNAME= name
DCB (Data Control Block) Parms DSORG=PS - A Physical sequential file organization
Dostları ilə paylaş:
|