# scan command - Statement with blank

**URL:** <https://techcommunity.softwareag.com/t/scan-command-statement-with-blank/99828>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [March 7, 2012, 1:57am UTC](https://techcommunity.softwareag.com/t/scan-command-statement-with-blank/99828 "2012-03-07T01:57:27Z")\
**Posts on this page:** 4\
**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:** [March 7, 2012, 1:57am UTC](https://techcommunity.softwareag.com/t/scan-command-statement-with-blank/99828/1 "2012-03-07T01:57:27Z")

</div>

Hi,

I am trying to use scan on library command, to find out any objects that use: find number or move left, but according to the manual, the example doesnt work for me. The blank is being used to separete the input values.

SCAN S,MOVE LEFT,MOVE RIGHT,SYSTEM,PGM0\*,N,\*,N,N - this is what is written in the manual.

I dont want to replace with any value, just find the object using some commands that have two words or - a blank between them.

I have already tried to use IM=F and it was used value for each fields, but none of information was generated.

Does anyone know how to solve it?

btw, Online, it works.

tks.

---

<div class="post-metadata">

**Author:** ![Helmut\_Spichtinger](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@Helmut\_Spichtinger](https://techcommunity.softwareag.com/u/Helmut_Spichtinger)\
**Post date:** [March 7, 2012, 11:55am UTC](https://techcommunity.softwareag.com/t/scan-command-statement-with-blank/99828/2 "2012-03-07T11:55:48Z")

</div>

> [@John Smith](#):
>
> Hi,
> 
> I am trying to use scan on library command, to find out any objects that use: find number or move left, but according to the manual, the example doesnt work for me. The blank is being used to separete the input values.
> 
> SCAN S,MOVE LEFT,MOVE RIGHT,SYSTEM,PGM0\*,N,\*,N,N - this is what is written in the manual.
> 
> I dont want to replace with any value, just find the object using some commands that have two words or - a blank between them.
> 
> I have already tried to use IM=F and it was used value for each fields, but none of information was generated.
> 
> Does anyone know how to solve it?
> 
> btw, Online, it works.
> 
> tks.

From the manual (four lines above your mentioned example):

“To scan for a value that contains lower-case characters or embedded blanks, do not specify the scan-value in the same line of the batch job as the SCAN command, but in a separate data line, and enter the data according to the online map…”

If you search for “DEFINE DATA” (the Natural session parameter ID is set to the character: ,)

SCAN  
S,DEFINE DATA

Always use the positional form, if you search for a string with embedded blanks. If you use direct commands: “In a direct command, values containing embedded blanks must be avoided to prevent undesired scan/replace results.”

---

<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:** [March 12, 2012, 1:56pm UTC](https://techcommunity.softwareag.com/t/scan-command-statement-with-blank/99828/3 "2012-03-12T13:56:45Z")

</div>

Hi Helmut,

it worked.

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:** [April 2, 2021, 3:01pm UTC](https://techcommunity.softwareag.com/t/scan-command-statement-with-blank/99828/4 "2021-04-02T15:01:37Z")

</div>


