# XREF - many objects and libraries - one sysout

**URL:** <https://techcommunity.softwareag.com/t/xref-many-objects-and-libraries-one-sysout/99060>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Add-on-Products, Natural-Predict, Natural-on-Windows-Unix\
**Created:** [November 28, 2011, 7:21pm UTC](https://techcommunity.softwareag.com/t/xref-many-objects-and-libraries-one-sysout/99060 "2011-11-28T19:21:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Smith](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/john_smith/32/39012_2.png) [@John\_Smith](https://techcommunity.softwareag.com/u/John_Smith)\
**Post date:** [November 28, 2011, 7:21pm UTC](https://techcommunity.softwareag.com/t/xref-many-objects-and-libraries-one-sysout/99060/1 "2011-11-28T19:21:00Z")

</div>

Hi,

I have a list of object and library, and I would like to print in only one sysout the XREF.

I tried to used stack command inside the program, but it executes only one command or the last one. Does anyone know how to do it or if there is other way to print it in one sysout.

see below the example of xref command or what I need to do…  
\*  
logon lib1  
l x report prog-1 (_) by \* on \*  
l x report prog-99 (_) by \* on \*  
l x report prog-xx (_) by \* on \*  
logon lib2  
l x report prog-100 (_) by \* on \*  
l x report prog-999 (\*) by \* on \*  
\*  
tks.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [November 28, 2011, 9:57pm UTC](https://techcommunity.softwareag.com/t/xref-many-objects-and-libraries-one-sysout/99060/2 "2011-11-28T21:57:09Z")

</div>

This works just fine for me, put the whole sequence of commands,  
from “logon lib1” thru “fin” on the CMSYNIN DD (assuming this is z/OS)

Hth, best regards,  
&nbsp;&nbsp;&nbsp;Wolfgang

---

<div class="post-metadata">

**Author:** ![John\_Smith](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/john_smith/32/39012_2.png) [@John\_Smith](https://techcommunity.softwareag.com/u/John_Smith)\
**Post date:** [November 29, 2011, 12:05am UTC](https://techcommunity.softwareag.com/t/xref-many-objects-and-libraries-one-sysout/99060/3 "2011-11-29T00:05:06Z")

</div>

Hi Wolfgang,

tks. I think you are right when you say that it works on MF., but I didnt say it before, but I am using Natural on Windows. I tried to use NATURAL BATCHMODE CMSYNIN as you written, but it didnt work, or better, it worked only if I use stack command, and besides this, only the last stack command is printed, but it didnt work when cmsynin is used. BTW, when I use cmsynin, nothing is printed.

It doesnt matter if the solution is to be used by cmsynin or stack command or even so, other solution, I need all xref in the same sysout.

do you or anyone have any other idea?

tks.

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [November 30, 2011, 5:43am UTC](https://techcommunity.softwareag.com/t/xref-many-objects-and-libraries-one-sysout/99060/4 "2011-11-30T05:43:56Z")

</div>

I have Natural for Windows (6.3.9), but I do not have Natural Security, so I tested the following procedure using repetitive TECH commands.

Modify the batch NatParms:

Natural Execution Configuration  
 → Device/Report Assignments  
 → Devices  
 → LPT1  
… Method: TTY  
… Close mode: User

Natural Execution Configuration  
 → Report parameters  
… Page eject: OFF

The Close Mode parameter allows reports to be appended. The Page Eject parameter eliminates a strange character from between the reports.

I do not have access to a mainframe to verify this next bit, but, as I recall, on that platform MAINPR has no effect on output from Predict nor system commands such as TECH. Under Windows I was able to separate the TECH output from Natural’s audit trail, so MAINPR may work for Predict, too.

I set MAINPR to 1, set device LPT1 parameters as above (Method and Close mode), and specified CMPRT01. Here’s the batch submission:

natural batchmode parm=NATBATCH CMSYNIN=batjob.inc CMOBJIN=batjob.inc CMPRINT=batjob.OUT CMPRT01=batjob.txt NATLOG=ALL BMSIM=MF

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:01pm UTC](https://techcommunity.softwareag.com/t/xref-many-objects-and-libraries-one-sysout/99060/5 "2021-04-02T15:01:15Z")

</div>


