Program AtNode c should modify to output a line to remote task Implicit Integer(a-z) Character*40 Node ! Argument Character*60 Task_Name ! Argument Character*80 Command ! Built from the two aruments Character*132 Line ! Buffer for data returned External Err_NoSuchTask ! Defined in ATNODEMSG.MSG External Err_BadNodeName ! Defined in ATNODEMSG.MSG * Collect the node name, remote task and their lengths. "'node_name'" * and "'remote_task'" are required elements defined in ATNODE.CLD. * If the elements are not found return a system error code via * LIB$SIGNAL. status = cli$get_value ('node_name', 2 Node, 2 Node_Len) if (.not. status) call lib$signal (%val (status)) colon = index(Node(1:Node_Len),'::') * If colons were not included then this is not a valid node name if (colon .eq. 0) goto 500 status = cli$get_value ('remote_task', 2 Task_Name, 2 Task_Name_Len) if (.not. status) call lib$signal (%val (status)) * Remove trailing blanks and tabs from the two input parameters call str$trim(Node, Node, Node_Len) call str$trim(Task_Name, Task_Name, Task_Name_Len) * Form the 'filename' i.e., NODE::"TASK=COMMANDPROCEDURE" Command_Len = Node_Len + Task_Name_Len + 7 Command(1:Command_Len) = 2 Node(1:Node_Len)//'"TASK='//Task_Name(1:Task_name_Len)//'"' * Establish a logical link with the remote task open (unit=1, name=Command(1:Command_Len), access='SEQUENTIAL', 2 status='OLD', err=400) * Accept input, from the remote task, and display it until EOF. do while (.true.) Line_Len = 0 read (1,100,err=200,end=300) Line_len,Line(1:Line_Len) 100 format(q,a) 200 if (Line_Len .lt. 1) then Line_Len = 1 Line(1:2) = ' ' ! bad ???? endif call lib$put_output(line(1:Line_Len)) end do * Disconnect the link 300 close (unit=1) call exit 400 call lib$signal(Err_NoSuchTask, %val(2),Task_Name(1:Task_Name_Len), 2 Node(1:Node_Len)) call exit 500 call lib$signal(Err_BadNodeName, %val(1), Node(1:Node_Len)) call exit end