Bytes
|
Description
|
---|---|
1-8
|
These bytes of the PCBF= variable contain the name of the logical terminal (LTERM)
that issued the message.
|
9-10
|
These bytes are reserved for IMS/ESA usage.
|
11-12
|
These bytes contain the DL/I status code. The status code can also be obtained by specifying the STATUS= option in the DL/I
INFILE statement.
|
13-16
|
These bytes contain
the date that the message was queued. The date is in packed decimal,
right aligned, Julian date format (YYDDD).
|
17-20
|
The time that the message
was queued is contained in these bytes in packed decimal format (HHMMSS.S).
|
21-24
|
The input message number
assigned by IMS/ESA is contained
in these bytes in IB4. (full-word binary) format.
|
25-32
|
These bytes contain the Message Output Descriptor (MOD) name. An MOD name is connected
to this PCB if Message Format Services (MFS) is used. If MFS is not used, there is
no MOD, and
this field is blank.
|
33-40
|
These bytes contain
the user identification data. The contents vary according to the source
of the message
|
Bytes
|
Description
|
---|---|
1-8
|
These bytes of the PCBF= variable contain the name of the destination associated with
the PCB.
|
9-10
|
These bytes are reserved for IMS/ESA usage.
|
11-12
|
These bytes contain the DL/I status code. The status code can also be obtained by
specifying the STATUS= option in the DL/I
INFILE statement.
|
data _null_; retain chkpnum 0; infile acctsam dli call=func pcb=pcbindex status=st; file acctsam dli; func = 'CHKP'; pcbindex = 1; chkpnum = chkpnum +1; put @1 'SAS' @4 chkpnum z5.; if st = ' ' then return; file log; put _all_; abort; run;
XD
status code in an IMS/ESA BMP region indicates that the IMS/ESA control region is
being shut down.
options imsbpin=trancode;
data _null_;
retain chkpnum 0;
infile acctsam dli call=func pcb=pcbindex
status=st;
file acctsam dli;
func = 'CHKP';
pcbindex = 1;
chkpnum = chkpnum +1;
put @1 'SAS'
@4 chkpnum z5.;
if st = ' ' then
do;
func = 'GU ';
input @;
if st ¬= ' ' then
if st= 'QC' then
do;
_error_ = 0;
stop;
end;
else
link abendit;
end;
else
if st = 'QC' then
do;
_error_ = 0;
stop;
end;
else
link abendit;
stop;
abendit:
file log;
put _all_;
abort;
run;
options imsbpin=*;
'A0'x
in
the IMS log. The example can be run using the SAS system options
IMSREGTP=DLI or IMSREGTP=BMP: data _null_; infile acctsam dli call=func pcb=pcbindex status=st; file acctsam dli; func = 'LOG '; pcbindex = 1; ll = 23; zz = '0000'x; logcode = 'A0'x; logsegm = 'Text of Log Record'; put @1 ll pib2. @3 zz @5 logcode @6 logsegm; if st ¬= ' ' then do; file log; put _all_; abort; end; stop; run;
put @1 ll pib4. @5 zz @7 logcode @8 logsegm;
data _null_; infile acctsam dli call=func pcb=pcbindex status=st; file acctsam dli; func = 'ROLL'; pcbindex = 1; put; if st ¬= ' ' then do; file log; put _all_; abort; end; stop; run;
options imsdlbko=y; data _null_; infile acctsam dli call=func pcb=pcbindex status=st; file acctsam dli; func = 'ROLB'; pcbindex = 1; put; if st ¬= ' ' then do; file log; put _all_; abort; end; stop; run;
data _null_; infile tranpsb dli call=func pcb=pcbindex status=st; file tranpsb dli; func = 'DEQ '; pcbindex = 1; put @1 'A'; if st ¬= ' ' then do; file log; put _all_; abort; end; stop; run;
options imsbpin=trancode;
data _null_;
infile acctsam dli call=func pcb=pcbindex
status=st;
file acctsam dli;
func = 'ROLB';
pcbindex = 1;
put;
if st ¬= ' ' then
do;
file log;
put _all_;
abort;
end;
stop;
run;
/* put a message in the queue */
data _null_;
infile tranpsb dli call=func pcb=pcbindex
status=st;
file tranpsb dli;
func = 'ISRT';
pcbindex = 2;
ll = 33;
zz = '0000'x;
msgsegm = 'trancode Message for Example # 2.';
put @1 ll pib2.
@3 zz
@5 msgsegm;
if st ¬= ' ' then
do;
file log;
put _all_;
abort;
end;
stop;
run;
data _null_;
infile acctsam dli call=func pcb=pcbindex
status=st;
pcbindex = 1;
file acctsam dli;
func = 'ROLB';
put @1 'SAVEIO';
if st ¬= ' ' then
if st = 'QC' then
_error_ = 0;
else
link abendit;
func = 'GU ';
input @;
if st = ' ' then
_error_ = 0;
else
link abendit;
stop;
abendit:
file log;
put _all_;
abort;
run;
data _null_; infile acctsam dli call=func pcb=pcbindex status=st; file acctsam dli; func = 'ROLB'; pcbindex = 1; put @1 'SAVEIO'; if st ¬= ' ' and st ¬= 'QC' then link abendit; return; abendit: file log; put _all_; abort; run; options imsbpin=*;
PUT;
, the message segment would not be returned by the ROLB call.
'/START DB ACCTDBD.
'
command. This example is run using the SAS system
options IMSREGTP=BMP and IMSBPIN=trancode :
options imsbpin=trancode;
data _null_;
infile tranpsb dli call=func pcb=pcbindex
status=st;
file tranpsb dli;
func = 'CMD ';
pcbindex = 1;
ll = 23;
zz = '0000'x;
put @1 ll pib2.
@3 zz
@5 '/START DB ACCTDBD. ';
if st ¬= ' ' then
do;
file log;
put _all_;
abort;
end;
run;
options imsbpin=*;
put @1 ll pib4. @5 zz @7 '/START DB D1MK0001.';
data _null_; infile tranpsb dli call=func pcb=pcbindex status=st; func = 'GU '; pcbindex = 1; input @; if st = 'CC' then do; func = 'GCMD'; input @; if st = ' ' or st = 'QD' then do; _error_ = 0; stop; end; else link abendit; end; else if st = 'QC' then do; _error_ = 0; stop; end; else link abendit; return; abendit: file log; put _all_; abort; run; options imsbpin=*;
options imsbpin=trancode;
data _null_;
infile acctsam dli call=func pcb=pcbindex
status=st;
func = 'GU ';
pcbindex = 1;
input @;
if st = ' ' then
do;
func = 'GN ';
do while (st = ' ');
input @;
if st ¬= ' ' then
if st = 'QD' then
do;
_error_ = 0;
stop;
end;
else
link abendit;
end;
end;
else
if st = 'QC' then
do;
_error_ = 0;
stop;
end;
else
link abendit;
stop;
abendit:
file log;
put _all_;
abort;
run;
options imsbpin=*;
Bytes
|
Description
|
---|---|
1-2
|
These bytes of the SAS buffer contain a value that is the length of the segment data
plus 4 (2 for the LL field and 2 for the ZZ field) in the PIB2. format.
|
3-4
|
These bytes contain
the ZZ fields and are reserved for IMS usage.
|
5-n
|
The segment data begin at byte 5. If this is the first segment of the message, the
transaction
code (up to 8 bytes in length) is in the first bytes of the message data.
|
Bytes
|
Description
|
---|---|
1-4
|
These bytes of the SAS buffer contain a value that is the length of the segment data
plus 4 (2 for the LL field and 2 for the ZZ field) in the PIB4. format. (The length
is 2 bytes less than the
total message segment.)
|
5-6
|
These bytes contain
the ZZ fields and are reserved for IMS usage.
|
7-n
|
The segment data begins at byte 7. If this is the first segment of the message, the
transaction
code (up to 8 bytes in length) is in the first bytes of the message data.
|
options imsbpin=trancode; data _null_; infile tranpsb dli call=func pcb=pcbindex status=st; file tranpsb dli; func = 'ISRT'; pcbindex = 2; ll = 35; zz = '0000'x; msgsegm = 'trancode Text of Message Segment'; put @1 ll pib2. @3 zz @5 msgsegm; if st ¬= ' ' then do; file log; put _all_; abort; end; stop; run; data _null_; infile acctsam dli call=func pcb=pcbindex status=st; func='GU '; pcbindex= 1; input @; if st ¬= ' ' then if st = 'QC' then do; _error_ = 0; stop; end; else do; file log; put _all_; abort; end; stop; run; options imsbpin=*;
put @1 ll pib4. @5 zz @7 msgsegm;
SSA1='#MODNAME=DFSMO4';
SSA1=' ';
statement should follow the first DL/I PUT so that the MOD is not re-specified on
ISRT calls for subsequent message segments.
data _null_; infile tranpsb dli call=func pcb=pcbindex status=st; file tranpsb dli; func = 'PURG'; pcbindex = 2; ll = 27; zz = '0000'x; msgsegm = 'Text of Message'; put @1 ll pib2. @3 zz @5 msgsegm; if st ¬= ' ' then do; file log; put _all_; abort; end; stop; run;
PUT;
data _null_;
infile tranpsb dli call=func pcb=pcbindex
status=st;
file tranpsb dli;
func = 'CHNG';
pcbindex = 3;
put @1 'destname';
if st ¬= ' ' then
do;
file log;
put _all_;
abort;
end;
stop;
run;
data _null_; infile tranpsb dli call=func pcb=pcbindex status=st; file tranpsb dli; func = 'PURG'; pcbindex = 3; put; if st = ' ' then do; func = 'CHNG'; put @1 '<destname>'; if st = ' ' then do; func = 'ISRT'; ll = 27; zz = '0000'x; msgsegm = 'Text of Message Segment'; put @1 ll pib2. @3 zz @5 msgsegm; if st = ' ' then stop; else link abendit; end; else link abendit; end; else link abendit; return; abendit: file log; put _all_; abort; run;