wat is scan and check ? give me real time scenarios where
we used these keywords in ur projects?

Answer Posted / sam

FACTOR 1 OPERATION FACTOR 2 RESULT
Comparator SCAN Base left most
string: length string:length position
of string

The SCAN operation scans a character string (base string)
contained in factor 2 for a substring (compare string)
contained in factor 1. The scan begins at a specified
location contained in factor 2 and continues for the length
of the compare string which is specified in factor 1.
The result field contains the numeric value of the leftmost
position of the compare string in the base string.

The CHECK operation verifies that each character in the
base string (factor 2) is among the characters indicated in
the comparator string (factor 1). Verifying begins at the
leftmost character of factor 2 and continues character by
character, from left to right. Each character of the base
string is compared with the characters of factor 1. If a
match for a character in factor 2 exists in factor 1, the
next base string character is verified. If a match is not
found, an integer value is placed in the result field to
indicate the position of the incorrect character.

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg

721


How to handle duplicate error handling in RPG?

1684


Q:HI friends accually ihave one problem plesase let me know the alternate code of this code. Related field description of code: Add a field, CALvsPRD, "Calendar Day Starts Before/After Production Day" to the parameter set WRKORDER which accepts values 'A' or 'B' o B = Calendar Day Starts Before Production Day o A = Calendar Day Starts After Production Day o Any other value indicates the production and calendar dates are always the same. code: Automatic Execution Of *INZSR Subroutine /Z01 * retrieves WRKORDER field values. /Z01 * Calculate default Production Date and return it to caller. /Z01 * Production date defaults to system date /Z01 C Eval P@Pdate = %DATE() /Z01 * unless Calendar date starts Before PDN(production) date and /Z01 * system time is before PDN Start Time then /Z01 * PDN date is yesterday. /Z01 C If W@CALvsPRD = 'B' and /Z01 C %TIME() < %TIME (W@Strtime) /Z01 C Eval P@Pdate -= %Day(1) /Z01 * unless Calendar date starts After PDN date and /Z01 * system time is *GE PDN(production) Start Time then /Z01 * PDN date is tomorrow. /Z01 C ElseIf W@CALvsPRD = 'A' and W@Strtime > *Zero and /Z01 C %TIME() >= %TIME (W@STrtime) /Z01 C Eval P@Pdate += %Day(1) /Z01 C EndIf /Z01 C Eval *InLr = *On

2015


How would display prime numbers using CL program?

5682


How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

1317






what is the use of sflnxtchg?

806


What are the types of identifiers?

574


how do I declare a table or array in rpg iv?

739


what is the difference between do while and do until?

713


How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique

551


what happens when sflsiz = sflpag? What are the advantages and disadvantages?

715


How Chain operation copies the record's data to the input buffer for the program?

1084


how can I tell when to replace the array?

705


what is program status data structure?

1392


what is the rpg system?

670