Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is the difference between clear and reset opcodes and
open and close opcodes?please tell me in real time senario
with example please?

And

What is the use of SFLNXTCHG?Where we can use this?

Answers were Sorted based on User's Feedback



what is the difference between clear and reset opcodes and open and close opcodes?please tell me i..

Answer / pravin

clear and reset both opcodes are used for clearing the
fields and then initialise the numeric fields with
zero and character with blanks difference is that if we
define any initilialise value for that var in pgm reset
initialize it by that value but clear initialize it by zero
or blanks.
OPEN & CLOSE opcodes are used for explicitly open and
close the file.

SFLNXTCHG :Its always read those records which changed
in uppdatesubfile.this is declared in subfile(SFL) format
not
SUBCTL format.

Is This Answer Correct ?    22 Yes 2 No

what is the difference between clear and reset opcodes and open and close opcodes?please tell me i..

Answer / balaji

CLEAR opcode is used to set a data item i.e. a field with
predefined default value based on its type. This opcode is
particularly useful when it specified for a data structure
because it clears all of the subfields in the data
structure.
char = *blanks Numeric = 0 etc

RESET is returns a filed to its intial value as specified
in INZ keyword.

Is This Answer Correct ?    9 Yes 0 No

what is the difference between clear and reset opcodes and open and close opcodes?please tell me i..

Answer / swadesh

clear and reset both opcodes are used for clearing the
fields.difference is that clear only clear but reset is
used for clear & then initialise the numeric fields with
zero and character with blanks.

OPEN & CLOSE opcodes are used for explicitly open and
close the file.In precise all files are automatically open
when these are processed by program bt at somepoint if we
want this should not be implicitly then open we use these
keywords.
SFLNXTCHG :Its always read those records which changed 2
or more times.this is declared in subfile(SFL) format not
SUBCTL format.

Is This Answer Correct ?    14 Yes 8 No

what is the difference between clear and reset opcodes and open and close opcodes?please tell me i..

Answer / john bulloch

Clear is used to re-initialise a set of data (fields,
arrays, data structures, record formats etc) to blanks for
alpha fields & zeros for numeric fields.
Reset is used to re-initialise a set of data (fields,
arrays, data structures, record formats etc) to it's
initial values set using the inz keyword.

When a file is defined as USROPN, you need to use OPEN &
CLOSE to (you guessed it) OPEN & CLOSE the file.

SFLNXTCHG is used when reading changed records in a subfile
using the READC opcode. The indicator is set on when the
data in the record changes.
For example, when you use READC to validate all the entries
in a subfile before updating or writing the data to a file,
the next time you use READC to perform the updates, you
wouldn't pick up the record you just validated without
reseting the SFLNXTCHG indicator as in the following:

(SFLNXTCHG is linked to indicator 85)

READC sflrec // read the first changed record
DOW not %EOF // process all changed records
Validate the record
*IN85 = *ON // Reset the SFLNXTCHG indicator
UPDATE SFLREC // Update it so that *IN85 sticks
READC sflrec // read the next changed record
ENDDO

now, when you readc to perform your updates, it will pick
up the records you validated in the previous loop

READC sflrec // read the first changed record
DOW not %EOF // process all changed records
update/write the data // read the next changed record
READC sflrec
ENDDO

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More IBM AS400 AllOther Interview Questions

Explain The Keywords Edtcde & Edtwrd?

0 Answers   IBM,


how to define to define a hidden filed in dspf ?

0 Answers   IBM,


how many specifications are there in rpg/400? What are they?

1 Answers   IBM,


Hi friends.. i want to be a IBM MainFrame Professional.. can any body tell me what is requirement for that... i m just BA, MA, and have simple diploma in Computers. what is pre-requisite.

3 Answers  


For AS/400 Freshers good website is

3 Answers   HCL, HP,


What is the purpose of PR and PI in calling program and called program? in Called program PR is compulsory?

1 Answers   HCL,


what is the necessary keyword for non-join logical file?

1 Answers   IBM,


What is an Array Data Structure?

1 Answers  


Suppose we have field reference file we were any changes that corresponding Physical file then what will Happen in field reference file??

5 Answers   IBM,


What is a library list ?

1 Answers  


what is the function of crtdupobj command?

1 Answers   IBM,


diffrence between rename and prefix

2 Answers  


Categories