# Natural SCAN using Batch

**URL:** <https://techcommunity.softwareag.com/t/natural-scan-using-batch/79808>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [December 18, 2008, 4:51pm UTC](https://techcommunity.softwareag.com/t/natural-scan-using-batch/79808 "2008-12-18T16:51:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sriramp](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@sriramp](https://techcommunity.softwareag.com/u/sriramp)\
**Post date:** [December 18, 2008, 4:51pm UTC](https://techcommunity.softwareag.com/t/natural-scan-using-batch/79808/1 "2008-12-18T16:51:26Z")

</div>

Hi,

Could anyone help me out in writing the JCL for doing a SCAN on the Natural Libraries for a particular string.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![subba](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@subba](https://techcommunity.softwareag.com/u/subba)\
**Post date:** [December 23, 2008, 11:22am UTC](https://techcommunity.softwareag.com/t/natural-scan-using-batch/79808/2 "2008-12-23T11:22:43Z")

</div>

Yes you can search using Batch…currently I have one jcl but u need to change the variable according u r requirements…it will require some batch operations please contact u r natural administrator…please find the example jcl here…

YOUR JOB CARD  
//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
//\* MEMBER: NATSCAN \*\*\*  
//\* SCAN NATURAL SOURCE CODE IN ALL LIBRARIES \*\*\*  
//\* WARNING, THIS IS SLOW AND EXPENSIVE \*\*\*  
/_JOBPARM P=TESTJCL  
//_\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
//JS010 EXEC NS02S010,  
// NPRM=‘,IM=D,MAINPR=1’  
//\* SCANSRC INPUT  
//\* SYSTEM-ID: T FOR TEST, S FOR STOW (PRODUCTION)  
//\* SCAN-VALUE: TEXT UP TO 50 BYTES  
//CMSYNIN DD \*  
SCANSRC  
S,RNOG  
FIN  
/\*

---

<div class="post-metadata">

**Author:** ![sriramp](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@sriramp](https://techcommunity.softwareag.com/u/sriramp)\
**Post date:** [December 24, 2008, 9:57am UTC](https://techcommunity.softwareag.com/t/natural-scan-using-batch/79808/3 "2008-12-24T09:57:11Z")

</div>

In infer from the following stmts,  
//CMSYNIN DD \*  
SCANSRC  
S,RNOG  
FIN

SCANSRC is a Natural Program that is defined to your system. And “S,RNOG” are the parameters that you pass onto your program SCANSRC.

I guess we could use the SCAN utility as such instead of using any other Natural Program.

---

<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, 2:51pm UTC](https://techcommunity.softwareag.com/t/natural-scan-using-batch/79808/4 "2021-04-02T14:51:17Z")

</div>


