What program performs the find action


















Due to the fact that most people use find to display search results to the screen, the default action performed by find when none is specified, is " -print ". Note that this is the case for the gnu implementation of the find utility which is used by Ubuntu and the other linux distributions , other implementations may require explicit use of "-print" in order to display any results at all.

The default "-print" action includes a newline character. If you specifically don't want this character at the end of each search result, use the " -print0 " action. It will print a null character rather than a newline character. This is especially useful if you're sending the results of find to another program where the newline may alter the other program's behaviour or simply be superfluous. A simple example will show how all the results are not on separate display lines:.

For each result returned by find, you can tweak the format of the text sent to standard output i. This action is used along with a format string specifying the output you would like from the find command. For a list of what you can use in a format string, please take a look at the man page. For example, to display a custom format including tabs like this:.

Here is an example of displaying the filename along with access and modification times for all. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta.

New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions. Add 2 ;. Add 3 ;. Add 4 ;. Add 5 ;. Add 6 ;. Add 7 ;. Next C Action Delegate. Recommended Articles. C How to get the last occurrence of the element in the List that match the specified conditions. C How to insert the elements of a collection into the List at the specified index. C How to get all elements of a List that match the conditions specified by the predicate.

By default, the program terminates, similar to what happens when a SQL error occurs. You must specify a non-zero return value to trigger an On Return action. However, if the program returns zero or False, Application Engine ignores the selected On Return value.

Minimize the number of distinct programs inside the loop. You should avoid having PeopleCode perform the actual work of the program and instead use it primarily to control the flow If, Then logic , build dynamic SQL, or interact with external systems. Using bind variables instead of literals to pass values to SQL statements is essential in PeopleCode loops or if the PeopleCode is called in a loop.

If the PeopleCode loops, Application Engine probably will use a dedicated cursor, which saves the overhead of recompiling the SQL for all iterations. If the PeopleCode is called from within a loop, Application Engine does not reduce the number of compiles, but it avoids flooding the SQL cache for those database servers that support SQL cache when it uses bind variables.

Do not use bind variables for values in a Select list or for SQL identifiers, such as table and column names, as some databases do not support them. Null bind values of type DateTime, Date, or Time are always resolved into literals. On database platforms for which this feature is implemented, setting BulkMode to True often results in significant performance gains when inserting rows into a table within a loop. In general, avoid PeopleCode calls within a loop.

If you can call the PeopleCode outside of the loop, use that approach to increase overall performance. The AESection PeopleCode class enables you to change the properties of an Application Engine program section dynamically, without having to modify any of the Application Engine tables directly.

This capability enables you to develop rule-based applications that conform dynamically to variables that a user submits through a page, such as the Application Engine Request page. Ensure that the rules to which your program conforms are relatively static or at least defined well enough that a standard template could easily accommodate them.

AESection Class. If you make a synchronous call, users cannot perform another PeopleSoft task until the Application Engine program completes. You should ensure that the program will run to successful completion consistently within an acceptable amount of time. If an Application Engine program called by CallAppEngine terminates abnormally, the user receives an error, similar to other save time errors, that forces the user to cancel the operation.

If the program was successful, it returns a zero; if the program was unsuccessful, it returns a value other than zero. The file layout class enables you to perform file input and output operations with Application Engine using PeopleCode. A file object enables you to open a file for reading or writing , read data from a file, or write data to it.

Using the combination of the file class and Application Engine provides an effective method to integrate or exchange the data stored in a legacy system with your PeopleSoft system.

The file class facilitates the creation of a flat file that both your legacy system and Application Engine programs support. An Application Engine program running on the application server uses a file object to read the file sent from the legacy system and to translate it so that the file can update affected PeopleSoft application tables.

For the PeopleSoft system and the legacy system to communicate, you first must construct a file object that both systems can use to insert and read data. Attain rowset and record access for a file using a file layout definition. You create the file layout definition in Application Designer, and it acts as a template for the file that both systems read from and write to.

This file layout definition simplifies reading, writing, and manipulating complex transaction data with PeopleCode. Generally, use the file class and Application Engine combination when you cannot implement the PeopleSoft Integration Broker solution. File Class. You also can use it to upgrade Application Engine programs from previous releases.

GNT file. Updates the state record as necessary, issues a commit, and then disconnects from the database after your program completes. If you add field names, Application Engine enables you to pass state record values to the called COBOL program and to get changes passed back to the calling PeopleCode program. If you do not pass initial values using state record fields, you need to insert the appropriate SQL in your called COBOL module to retrieve the appropriate values.

Then, to return any updated values to the calling Application Engine program, you must insert the appropriate SQL into a PeopleCode program.

If you include extra SQL processing and use non-state record values, for consistency purposes, creating a custom executable file might be a better approach. FIELD2 ;. This parameter makes the remote call from Application Engine distinct from a normal remote call.

When you enter this parameter, in effect you enable the following parameters, some of which are required. PTPECOBL then reserves space in memory for all of the fields in the state record, regardless of whether they will ultimately store values for processing.

The quoted field names you specify must exist in the specified state record. The corresponding value can be a PeopleCode variable, a record. Commit and RemoteCall. Run a commit in the step immediately preceding the step containing the RemoteCall PeopleCode action and also in the step containing the Remote Call PeopleCode action. These two actions enable the COBOL process to recognize the data changes made up to the point that it was called, and minimizes the time when the process might be in a non-restartable state.

If the intent of your COBOL process is to update the value of a passed state record field, then the calling Application Engine PeopleCode is responsible for ensuring that the state record field is modified, and the Application Engine program is responsible for committing the state record updates.

Because the work in COBOL will have already completed and been committed, will your module ignore a duplicate call or be able to undo or redo the work multiple times? You face similar issues when you run a remote call from PeopleCode.

Typically, when a COBOL program updates the database and then disconnects or terminates without having issued an explicit commit or rollback, an implicit rollback occurs. By default, RemoteCall does not generate any log files after the program completes. To generate and retain the. See SetNextPanel. When using APIs, remember that:.

If you called a component interface from an Application Engine program, all the errors related to the API are logged in the PSMessage collection associated with the current session object. If you sent a message, errors are written to the message log and the Application Engine message log. If an Application Engine program called from a message subscription PeopleCode encounters errors and the program exits with Exit 1 , the error is written to the message log and is marked as an error.

This function commits pending changes inserts, updates, and deletes to the database. When using CommitWork, remember that:. The same is true for commit settings at the section or step levels.

The CommitWork function is useful only when you are processing SQL one row at a time in a single PeopleCode program, and you need to commit without exiting the program. In a typical Application Engine program, SQL commands are split between multiple Application Engine actions that fetch, insert, update, or delete application data.

You use the section or step level commit settings to manage the commits.



0コメント

  • 1000 / 1000