static VOID qrubdhdlr( QRIOB * qriob ) { i4 seglen = 0; i4 data_end = 0; i4 count = 0; /* check for NULL data somewhere here and take appropriate action if ** found (will data_end be 1 in this case?) */ if ( qriob->qrb->tm ) { qrputc( qriob->qrb, DRCH_V ); /* begin with a | */ while ( data_end != 1 ) /* get and put to user 2k or less segs */ { qriob->dbv.db_length = QR_DRBSZ; IILQlgd_LoGetData((i4)(II_DATLEN|II_DATSEG), DB_DBV_TYPE, QR_DRBSZ, &(qriob->dbv), QR_DRBSZ, &seglen, &data_end ); if (IIerrtest() != 0) { IILQled_LoEndData(); return; } count++; /* blob col names are formatted into GL_MAXNAME size boxes. /* if entire blob is shorter than column header size, set ** db_length to column header size (GL_MAXNAME) so that printatt ** will blank pad correctly. */ if (count == 1 && data_end == 1 && seglen < qriob->qrb->col_maxname) qriob->dbv.db_length = qriob->qrb->col_maxname; else qriob->dbv.db_length = seglen; printatt( qriob->qrb, &(qriob->dbv), TRUE ); (*(qriob->qrb->putfunc))(qriob->qrb); } } else /* don't output the blobs, this is not 'tm'. token only. */ { /* don't need to go through printatt in this case, ** no translation or conversion is necessary */ IILQled_LoEndData(); /* first time through, retrieve the token from er file */ if ( blob_token == NULL ) blob_token = ERget(F_QR011E_Unbounded_data); qrputc(qriob->qrb, DRCH_V); qradd(qriob->qrb, blob_token, seglen = STlength( blob_token )); /* blob col names are formatted into ** DB_MAXNAME size boxes. the token ** must be padded or truncated to fit. ** data_end is not mnemonic here!! */ for( data_end = ( qriob->qrb->col_maxname - seglen ); data_end > 0; data_end -- ) qrputc(qriob->qrb, ' '); } return; }
void IIpLQlgd_LoGetData(i4 flags,i4 hosttype,i4 hostlen,char *addr, i4 maxlen,i4 *seglen, i4 *dataend) { IILQlgd_LoGetData(flags,hosttype,hostlen,addr,maxlen,seglen,dataend); }