Re: utility to monitor a susbsystem & jobq
it wont hurt anything........It will just run or not!
jamie
it wont hurt anything........It will just run or not!
jamie
JobType = '*';
JobType = 'I';
if Jobbstatus = 'RUN'; dsply 'Found a running Job'; endif;
ljob200.JobType = 'I'
* * CrtUsrSpc: Create User Space for OS/400 API's * d QUSCRTUS pr extpgm('QUSCRTUS') d UsrSpc 20A const d ExtAttr 10A const d InitialSize 10I 0 const d InitialVal 1A const d PublicAuth 10A const d Text 50A const d Replace 10A const d ErrorCode 32766A options(*nopass: *varsize) * * --- Prototype for API Retrive User Space * d QUSRTVUS pr extpgm( 'QUSRTVUS' ) d QRtvUserSpace... d 20 d QRtvStartingPosition... d 8b 0 d QRtvLengthOfData... d 8b 0 d QRtvReceiverVariable... d 32048 d QRtvError... d 256 * --- Prototype for API Retrive List Job * d QUSLJOB pr extpgm( 'QUSLJOB' ) d QJobUserSpace... d 20 d QJobFormatName... d 8 d QJobJobName... d 26 d QFldStatus... d 10 d QFldError... d 256 d QJobType... d 1 d QNbrFldRtn... d 8b 0 d QKeyFldRtn... d 8b 0 dim( 100 ) * * Defined variables * d size s 10I 0 d UsrSpcName s 20 inz( 'DSPJOB QTEMP ' ) ****************************************************************** dQUSA0100 DS d QUsrSpcOffset... d 1 4B 0 d QUsrSpcEntries... d 9 12B 0 d QUsrSpcEntrieSize... d 13 16B 0 dLJOBINPUT ds qualified d JobName... d 1 10 d UserName... d 11 20 d JobNumber... d 21 26 d Status... d 27 36 d UserSpace... d 37 46 d UserSpaceLibrary... d 47 56 d Format... d 57 64 d JobType... d 65 65 d Reserved01... d 66 68 d Reserved02... d 69 72B 0 * dLJOB100 ds qualified d JobName... d 1 10 d UserName... d 11 20 d JobNumber... d 21 26 d InternalJobId... d 27 42 d Status... d 43 52 d JobType... d 53 53 d JobSubType... d 54 54 d Reserved01... d 55 56 * dLJOB200 ds qualified d JobName... d 1 10 d UserName... d 11 20 d JobNumber... d 21 26 d InternalJobId... d 27 42 d Status... d 43 52 d JobType... d 53 53 d JobSubType... d 54 54 d Reserved01... d 55 56 d JobInfoStatus... d 57 57 d Reserved02... d 58 60 d NumberOfFieldsReturned... d 61 64B 0 d ReturnedData... d 65 1064 * dLJOB200KEY ds qualified d KeyNumber01... d 1 4B 0 d NumberOfKeys... d 5 8B 0 * dLJOBKEYINFO ds qualified d LengthOfInformation... d 1 4b 0 d KeyField... d 5 8b 0 d TypeOfData... d 9 9 d Reserved01... d 10 12 d LengthOfData... d 13 16B 0 d KeyData... d 17 1016 * * APIErrDef Standard API error handling structure. * * dQUSEC DS d ErrorBytesProvided... d 1 4B 0 d ErrorBytesAvailble... d 5 8b 0 d ErrorExceptionId... d 9 15 d ErrorReserved... d 16 16 * dAPIError DS d APIErrorProvied... d LIKE( ErrorBytesProvided ) d INZ( %LEN( APIError ) ) d APIErrorAvailble... d LIKE( ErrorBytesAvailble ) d APIErrorMessageID... d LIKE( ErrorExceptionId ) d APIErrorReserved... d LIKE( ErrorReserved ) d APIErrorInformation... d 240A *----------------------------------------------------------------- * program status dataarea *----------------------------------------------------------------- d PgmSts SDS d P1User 254 263 d @PGM *PROC d @JOB 244 253 *--------------------------------------------------------------* * work fields * *--------------------------------------------------------------* d Variables ds d Q 1 inz( '''' ) d Count 15 0 inz( 0 ) d KeyCount 15 0 inz( 0 ) d EndPos 15 0 inz( 0 ) d JobbStatus 4 inz( ' ' ) d Subsystem 20 inz( ' ' ) d ReturnCode 1 inz( ' ' ) d FormatName 8 inz( ' ' ) d QualifedJobName... d 26 inz( ' ' ) d JobStatus 10 inz( ' ' ) d JobType 1 inz( ' ' ) d NbrOfFldRtn 8B 0 inz( 0 ) d KeyFldRtn 8B 0 inz( 0 ) dim( 100 ) d StartingPosition... d 8B 0 inz( 0 ) d LengthOfData... d 8B 0 inz( 0 ) d KeyStartingPosition... d 8B 0 inz( 0 ) d KeyLengthOfData... d 8B 0 inz( 0 ) d ReceiverVariable... d 32048 d OS400_Cmd 2000 inz( ' ' ) d CmdLength 15P 5 inz( %size( OS400_Cmd ) ) d True 1 inz( *on ) d False 1 inz( *off ) * d qcmdexc pr extpgm( 'QCMDEXC' ) d os400_cmd 2000A options( *varsize ) const d cmdlength 15P 5 const * d emailaddress s 50 inz('as400pro@code400.com') * /free // // Create a user space // size = 10000; // Create a user space QUSCRTUS(UsrSpcName: 'USRSPC': size: x'00': '*ALL': 'Temp User Space for QUSLJOB API': '*YES': APIError); exsr CheckStatusOfJob; *inlr = *on; // ************************************************************* // check status of an job // ------------------------------------------------------------- begsr CheckStatusOfJob; // run API to fill user space with information about all iSeries job FormatName = 'JOBL0200'; QualifedJobName = '*ALL ' + '*ALL ' + '*ALL '; JobStatus = '*ACTIVE'; JobType = '*'; NbrOfFldRtn = 2; KeyFldRtn( 1 ) = 0101; KeyFldRtn( 2 ) = 1906; callp QUSLJOB( UsrSpcName : FormatName : QualifedJobName : JobStatus : APIError : JobType : NbrOfFldRtn : KeyFldRtn ); // if error message from the retrieve job API then dump program if APIErrorMessageID <> ' '; dump; ReturnCode = True; leavesr; endif; // run API to get user space attribute StartingPosition = 125; LengthOfData = 16; callp QUSRTVUS( UsrSpcName : StartingPosition : LengthOfData : ReceiverVariable : APIError ); QUSA0100 = ReceiverVariable; // if error message from the retrieve user space API then dump program if APIErrorMessageID <> ' '; dump; ReturnCode = True; leavesr; endif; // preperation to read from user space StartingPosition = QUsrSpcOffset + 1; LengthOfData = QUsrSpcEntrieSize; // read from user space for count = 1 to QUsrSpcEntries; callp QUSRTVUS( UsrSpcName : StartingPosition : LengthOfData : ReceiverVariable : APIError ); LJOB200 = ReceiverVariable; if APIErrorMessageID <> ' '; dump; ReturnCode = True; leavesr; endif; // check status of job JobbStatus = ' '; Subsystem = ' '; LJobKeyInfo = LJob200.ReturnedData; // Job type // A The job is an autostart job. // B The job is a batch job. // I The job is an interactive job. // M The job is a subsystem monitor job. // R The job is a spooled reader job. // S The job is a system job. // W The job is a spooled writer job. // X The job is the SCPF system job. // Job subtype // D The job is a batch immediate job. // E The job started with a procedure start request. // F The job is an AS/400 Advanced 36 machine server job. // J The job is a prestart job. // P The job is a print driver job. // T The job is a System/36 multiple requester terminal (MRT) job. // U The job is an alternate spool user. KeyStartingPosition = 1; KeyLengthOfData = LJobKeyInfo.LengthOfInformation; for keycount = 1 to LJob200.NumberOfFieldsReturned; LJobKeyInfo = %subst( LJob200.ReturnedData : KeyStartingPosition : KeyLengthOfData ); KeyLengthOfData = LJobKeyInfo.LengthOfInformation; LJobKeyInfo = %subst( LJob200.ReturnedData : KeyStartingPosition : KeyLengthOfData ); Endpos = LJobKeyInfo.LengthOfData; if LJobKeyInfo.KeyField = 0101; JobbStatus = %subst( LJobKeyInfo.KeyData : 1 : Endpos ); elseif LJobKeyInfo.KeyField = 1906; Subsystem = %subst( LJobKeyInfo.KeyData : 1 : Endpos ); endif; KeyStartingPosition = KeyStartingPosition + KeyLengthOfData; endfor; // if job in message wait then email message to address in // variable email address if Jobbstatus = 'MSGW'; os400_cmd = 'snddst type(*lmsg) ' + 'tointnet((' + Q + %trim(EmailAddress) + Q + ')) dstd(' + Q + 'Hey Its me ' + %trim(@job) + ' ' + %char(%time()) + Q + ') longmsg(' + Q + 'Job in Message wait: ' + %trim(ljob200.jobname) + ' ' + %trim(ljob200.username) + ' ' + %trim(ljob200.jobnumber) + ' ' + %char(%time()) + Q + ')'; qcmdexc ( os400_cmd : %size ( os400_cmd ) ); endif; StartingPosition = StartingPosition + LengthOfData; endfor; endsr;
d StartingPosition... d 8B 0 inz( 0 )
d StartingPosition... d 20i 0 inz( 0 )
* * CrtUsrSpc: Create User Space for OS/400 API's * d QUSCRTUS pr extpgm('QUSCRTUS') d UsrSpc 20A const d ExtAttr 10A const d InitialSize 10I 0 const d InitialVal 1A const d PublicAuth 10A const d Text 50A const d Replace 10A const d ErrorCode 32766A options(*nopass: *varsize) * * --- Prototype for API Retrive User Space * d QUSRTVUS pr extpgm( 'QUSRTVUS' ) d QRtvUserSpace... d 20 d QRtvStartingPosition... d 10i 0 d QRtvLengthOfData... d 10i 0 d QRtvReceiverVariable... d 32048 d QRtvError... d 256 * --- Prototype for API Retrive List Job * d QUSLJOB pr extpgm( 'QUSLJOB' ) d QJobUserSpace... d 20 d QJobFormatName... d 8 d QJobJobName... d 26 d QFldStatus... d 10 d QFldError... d 256 d QJobType... d 1 d QNbrFldRtn... d 10i 0 d QKeyFldRtn... d 10i 0 dim( 100 ) * * Defined variables * d size s 10I 0 d UsrSpcName s 20 inz( 'DSPJOB QTEMP ' ) ****************************************************************** dQUSA0100 DS d QUsrSpcOffset... d 10i 0 d QUSAreserved... d 10i 0 d QUsrSpcEntries... d 10i 0 d QUsrSpcEntrieSize... d 10i 0 dLJOBINPUT ds qualified d JobName... d 10 d UserName... d 10 d JobNumber... d 6 d Status... d 10 d UserSpace... d 10 d UserSpaceLibrary... d 10 d Format... d 8 d JobType... d 1 d Reserved01... d 3 d Reserved02... d 10i 0 * dLJOB100 ds qualified d JobName... d 1 10 d UserName... d 11 20 d JobNumber... d 21 26 d InternalJobId... d 27 42 d Status... d 43 52 d JobType... d 53 53 d JobSubType... d 54 54 d Reserved01... d 55 56 * dLJOB200 ds qualified d JobName... d 10 d UserName... d 10 d JobNumber... d 6 d InternalJobId... d 16 d Status... d 10 d JobType... d 1 d JobSubType... d 1 d Reserved01... d 2 d JobInfoStatus... d 1 d Reserved02... d 3 d NumberOfFieldsReturned... d 10i 0 d ReturnedData... d 1000 * dLJOB200KEY ds qualified d KeyNumber01... d 10i 0 d NumberOfKeys... d 10i 0 * dLJOBKEYINFO ds qualified d LengthOfInformation... d 10i 0 d KeyField... d 10i 0 d TypeOfData... d 1 d Reserved01... d 3 d LengthOfData... d 10i 0 d KeyData... d 1000 * * APIErrDef Standard API error handling structure. * * dQUSEC DS d ErrorBytesProvided... d 10i 0 d ErrorBytesAvailble... d 10i 0 d ErrorExceptionId... d 7 d ErrorReserved... d 1 * dAPIError DS d APIErrorProvied... d LIKE( ErrorBytesProvided ) d INZ( %LEN( APIError ) ) d APIErrorAvailble... d LIKE( ErrorBytesAvailble ) d APIErrorMessageID... d LIKE( ErrorExceptionId ) d APIErrorReserved... d LIKE( ErrorReserved ) d APIErrorInformation... d 240A *----------------------------------------------------------------- * program status dataarea *----------------------------------------------------------------- d PgmSts SDS d P1User 254 263 d @PGM *PROC d @JOB 244 253 *--------------------------------------------------------------* * work fields * *--------------------------------------------------------------* d Variables ds d Q 1 inz( '''' ) d Count 15 0 inz( 0 ) d KeyCount 15 0 inz( 0 ) d EndPos 15 0 inz( 0 ) d JobbStatus 4 inz( ' ' ) d Subsystem 20 inz( ' ' ) d ReturnCode 1 inz( ' ' ) d FormatName 8 inz( ' ' ) d QualifedJobName... d 26 inz( ' ' ) d JobStatus 10 inz( ' ' ) d JobType 1 inz( ' ' ) d NbrOfFldRtn 10i 0 inz( 0 ) d KeyFldRtn 10i 0 inz( 0 ) dim( 100 ) d StartingPosition... d 10i 0 inz( 0 ) d LengthOfData... d 10i 0 inz( 0 ) d KeyStartingPosition... d 10i 0 inz( 0 ) d KeyLengthOfData... d 10i 0 inz( 0 ) d ReceiverVariable... d 32048 d OS400_Cmd 2000 inz( ' ' ) d CmdLength 15P 5 inz( %size( OS400_Cmd ) ) d True 1 inz( *on ) d False 1 inz( *off ) * d qcmdexc pr extpgm( 'QCMDEXC' ) d os400_cmd 2000A options( *varsize ) const d cmdlength 15P 5 const * d emailaddress s 50 inz('someone@code400.com') * /free // // Create a user space // size = 10000; // Create a user space QUSCRTUS(UsrSpcName: 'USRSPC': size: x'00': '*ALL': 'Temp User Space for QUSLJOB API': '*YES': APIError); exsr CheckStatusOfJob; *inlr = *on; // ************************************************************* // check status of an job // ------------------------------------------------------------- begsr CheckStatusOfJob; // run API to fill user space with information about all iSeries job FormatName = 'JOBL0200'; QualifedJobName = '*ALL ' + '*ALL ' + '*ALL '; JobStatus = '*ACTIVE'; JobType = '*'; NbrOfFldRtn = 2; KeyFldRtn( 1 ) = 0101; KeyFldRtn( 2 ) = 1906; callp QUSLJOB( UsrSpcName : FormatName : QualifedJobName : JobStatus : APIError : JobType : NbrOfFldRtn : KeyFldRtn ); // if error message from the retrieve job API then dump program if APIErrorMessageID <> ' '; dump; ReturnCode = True; leavesr; endif; // run API to get user space attribute StartingPosition = 125; LengthOfData = 16; callp QUSRTVUS( UsrSpcName : StartingPosition : LengthOfData : ReceiverVariable : APIError ); QUSA0100 = ReceiverVariable; // if error message from the retrieve user space API then dump program if APIErrorMessageID <> ' '; dump; ReturnCode = True; leavesr; endif; // preperation to read from user space StartingPosition = QUsrSpcOffset + 1; LengthOfData = QUsrSpcEntrieSize; // read from user space for count = 1 to QUsrSpcEntries; callp QUSRTVUS( UsrSpcName : StartingPosition : LengthOfData : ReceiverVariable : APIError ); LJOB200 = ReceiverVariable; if APIErrorMessageID <> ' '; dump; ReturnCode = True; leavesr; endif; // check status of job JobbStatus = ' '; Subsystem = ' '; LJobKeyInfo = LJob200.ReturnedData; // Job type // A The job is an autostart job. // B The job is a batch job. // I The job is an interactive job. // M The job is a subsystem monitor job. // R The job is a spooled reader job. // S The job is a system job. // W The job is a spooled writer job. // X The job is the SCPF system job. // Job subtype // D The job is a batch immediate job. // E The job started with a procedure start request. // F The job is an AS/400 Advanced 36 machine server job. // J The job is a prestart job. // P The job is a print driver job. // T The job is a System/36 multiple requester terminal (MRT) job. // U The job is an alternate spool user. KeyStartingPosition = 1; KeyLengthOfData = LJobKeyInfo.LengthOfInformation; for keycount = 1 to LJob200.NumberOfFieldsReturned; LJobKeyInfo = %subst( LJob200.ReturnedData : KeyStartingPosition : KeyLengthOfData ); KeyLengthOfData = LJobKeyInfo.LengthOfInformation; LJobKeyInfo = %subst( LJob200.ReturnedData : KeyStartingPosition : KeyLengthOfData ); Endpos = LJobKeyInfo.LengthOfData; if LJobKeyInfo.KeyField = 0101; JobbStatus = %subst( LJobKeyInfo.KeyData : 1 : Endpos ); elseif LJobKeyInfo.KeyField = 1906; Subsystem = %subst( LJobKeyInfo.KeyData : 1 : Endpos ); endif; KeyStartingPosition = KeyStartingPosition + KeyLengthOfData; endfor; // if job in message wait then email message to address in // variable email address if Jobbstatus = 'MSGW'; os400_cmd = 'snddst type(*lmsg) ' + 'tointnet((' + Q + %trim(EmailAddress) + Q + ')) dstd(' + Q + 'Hey Its me ' + %trim(@job) + ' ' + %char(%time()) + Q + ') longmsg(' + Q + 'Job in Message wait: ' + %trim(ljob200.jobname) + ' ' + %trim(ljob200.username) + ' ' + %trim(ljob200.jobnumber) + ' ' + %char(%time()) + Q + ')'; qcmdexc ( os400_cmd : %size ( os400_cmd ) ); endif; StartingPosition = StartingPosition + LengthOfData; endfor; endsr;
D DSBinFix DS Qualified
D Int1 1 2B 0 inz(*LoVal)
D Bl1 3 3A inz(*Blanks)
D Int2 4 5B 0 inz(*HiVal)
D Bl2 6 6A inz(*Blanks)
D Int3 7 10B 0 inz(*LoVal)
D Bl3 11 11A inz(*Blanks)
D Int4 12 15B 0 inz(*HiVal)
D Bl4 16 16A
D DSIntFix DS Qualified
D Int1 1 2I 0 inz(*LoVal)
D Bl1 3 3A inz(*Blanks)
D Int2 4 5I 0 inz(*HiVal)
D Bl2 6 6A inz(*Blanks)
D Int3 7 10I 0 inz(*LoVal)
D Bl3 11 11A inz(*Blanks)
D Int4 12 15I 0 inz(*HiVal)
D Bl4 16 16A
D DSBinLength DS Qualified
D Int1 4B 0 inz(*LoVal)
D 1A inz(*Blanks)
D Int2 4B 0 inz(*HiVal)
D 1A inz(*Blanks)
D Int3 9B 0 inz(*LoVal)
D 1A inz(*Blanks)
D Int4 9B 0 inz(*HiVal)
D 1A
D DSIntLength DS Qualified
D Int1 5I 0 inz(*LoVal)
D 1A inz(*Blanks)
D Int2 5I 0 inz(*HiVal)
D 1A inz(*Blanks)
D Int3 10I 0 inz(*LoVal)
D 1A inz(*Blanks)
D Int4 10I 0 inz(*HiVal)
D 1A
*------------------------------------------------------------------------------%
/Free
Dsply (%char(DSBinFix.Int1) + ' ' + %Char(DSBinFix.Int2));
Dsply (%char(DSIntFix.Int1) + ' ' + %Char(DSIntFix.Int2));
Dsply (%char(DSBinLength.Int1) + ' ' + %Char(DSBinLength.Int2));
Dsply (%char(DSIntLength.Int1) + ' ' + %Char(DSIntLength.Int2));
Dsply (%char(DSBinFix.Int3) + ' ' + %Char(DSBinFix.Int4));
Dsply (%char(DSIntFix.Int3) + ' ' + %Char(DSIntFix.Int4));
Dsply (%char(DSBinLength.Int3) + ' ' + %Char(DSBinLength.Int4));
Dsply (%char(DSIntLength.Int3) + ' ' + %Char(DSIntLength.Int4));
*InLR = *ON;
/End-Free
D DSBinFix DS Qualified
D Int1 1 2B 0 inz(*LoVal)
D Bl1 3 3A inz(*Blanks)
D Int2 4 5B 0 inz(*HiVal)
D Bl2 6 6A inz(*Blanks)
D Int3 7 10B 0 inz(*LoVal)
D Bl3 11 11A inz(*Blanks)
D Int4 12 15B 0 inz(*HiVal)
D Bl4 16 16A
D DSIntFix DS Qualified
D Int1 1 2I 0 inz(*LoVal)
D Bl1 3 3A inz(*Blanks)
D Int2 4 5I 0 inz(*HiVal)
D Bl2 6 6A inz(*Blanks)
D Int3 7 10I 0 inz(*LoVal)
D Bl3 11 11A inz(*Blanks)
D Int4 12 15I 0 inz(*HiVal)
D Bl4 16 16A
D DSBinLength DS Qualified
D Int1 4B 0 inz(*LoVal)
D 1A inz(*Blanks)
D Int2 4B 0 inz(*HiVal)
D 1A inz(*Blanks)
D Int3 9B 0 inz(*LoVal)
D 1A inz(*Blanks)
D Int4 9B 0 inz(*HiVal)
D 1A
D DSIntLength DS Qualified
D Int1 5I 0 inz(*LoVal)
D 1A inz(*Blanks)
D Int2 5I 0 inz(*HiVal)
D 1A inz(*Blanks)
D Int3 10I 0 inz(*LoVal)
D 1A inz(*Blanks)
D Int4 10I 0 inz(*HiVal)
D 1A
*------------------------------------------------------------------------------%
/Free
Dsply (%char(DSBinFix.Int1) + ' ' + %Char(DSBinFix.Int2));
Dsply (%char(DSIntFix.Int1) + ' ' + %Char(DSIntFix.Int2));
Dsply (%char(DSBinLength.Int1) + ' ' + %Char(DSBinLength.Int2));
Dsply (%char(DSIntLength.Int1) + ' ' + %Char(DSIntLength.Int2));
Dsply (%char(DSBinFix.Int3) + ' ' + %Char(DSBinFix.Int4));
Dsply (%char(DSIntFix.Int3) + ' ' + %Char(DSIntFix.Int4));
Dsply (%char(DSBinLength.Int3) + ' ' + %Char(DSBinLength.Int4));
Dsply (%char(DSIntLength.Int3) + ' ' + %Char(DSIntLength.Int4));
*InLR = *ON;
/End-Free
* * DSINTBIN.INT1 = -9999. * DSINTBIN.BL1 = ' ' * DSINTBIN.INT2 = 9999. * DSINTBIN.BL2 = ' ' * DSINTBIN.INT3 = -999999999. * DSINTBIN.BL3 = ' ' * DSINTBIN.INT4 = 999999999. * DSINTBIN.BL4 = ' ' * D DSIntBin DS Qualified D Int1 1 2B 0 inz(*LoVal) D Bl1 3 3A inz(*Blanks) D Int2 4 5B 0 inz(*HiVal) D Bl2 6 6A inz(*Blanks) D Int3 7 10B 0 inz(*LoVal) D Bl3 11 11A inz(*Blanks) D Int4 12 15B 0 inz(*HiVal) D Bl4 16 16A * * * DSINTFIX.INT1 = -32768 * DSINTFIX.BL1 = ' ' * DSINTFIX.INT2 = 32767 * DSINTFIX.BL2 = ' ' * DSINTFIX.INT3 = -2147483648 * DSINTFIX.BL3 = ' ' * DSINTFIX.INT4 = 2147483647 * DSINTFIX.BL4 = ' ' * D DSIntFix DS Qualified D Int1 1 2I 0 inz(*LoVal) D Bl1 3 3A inz(*Blanks) D Int2 4 5I 0 inz(*HiVal) D Bl2 6 6A inz(*Blanks) D Int3 7 10I 0 inz(*LoVal) D Bl3 11 11A inz(*Blanks) D Int4 12 15I 0 inz(*HiVal) D Bl4 16 16A * * DSBINLENGTH.INT1 = -9999. * DSBINLENGTH. = ' ' * DSBINLENGTH.INT2 = 9999. * DSBINLENGTH. = ' ' * DSBINLENGTH.INT3 = -999999999. * DSBINLENGTH. = ' ' * DSBINLENGTH.INT4 = 999999999. * DSBINLENGTH. = ' ' * D DSBinLength DS Qualified D Int1 4B 0 inz(*LoVal) D 1A inz(*Blanks) D Int2 4B 0 inz(*HiVal) D 1A inz(*Blanks) D Int3 9B 0 inz(*LoVal) D 1A inz(*Blanks) D Int4 9B 0 inz(*HiVal) D 1A * * DSINTLENGTH.INT1 = -32768 * DSINTLENGTH. = ' ' * DSINTLENGTH.INT2 = 32767 * DSINTLENGTH. = ' ' * DSINTLENGTH.INT3 = -2147483648 * DSINTLENGTH. = ' ' * DSINTLENGTH.INT4 = 2147483647 * DSINTLENGTH. = ' ' * D DSIntLength DS Qualified D Int1 5I 0 inz(*LoVal) D 1A inz(*Blanks) D Int2 5I 0 inz(*HiVal) D 1A inz(*Blanks) D Int3 10I 0 inz(*LoVal) D 1A inz(*Blanks) D Int4 10I 0 inz(*HiVal) D 1A *------------------------------------------------------------------------------- /Free Dsply (%char(DSIntBin.Int1) + ' ' + %Char(DSIntBin.Int2)); Dsply (%char(DSIntFix.Int1) + ' ' + %Char(DSIntFix.Int2)); Dsply (%char(DSBinLength.Int1) + ' ' + %Char(DSBinLength.Int2)); Dsply (%char(DSIntLength.Int1) + ' ' + %Char(DSIntLength.Int2)); Dsply (%char(DSIntBin.Int3) + ' ' + %Char(DSIntBin.Int4)); Dsply (%char(DSIntFix.Int3) + ' ' + %Char(DSIntFix.Int4)); Dsply (%char(DSBinLength.Int3) + ' ' + %Char(DSBinLength.Int4)); Dsply (%char(DSIntLength.Int3) + ' ' + %Char(DSIntLength.Int4)); *InLR = *ON; /End-Free
Comment