OUTREC FIELDS= (1,20,CTOTAL,5Z,21,10), ----+----1----+----2----+----3 A file has 100 records. . If you want to replace or remove data anywhere in records, the FINDREP parameter of the OUTREC statement needs to use instead. Would the magnetic fields of double-planets clash? Learn more. Why do many companies reject expired SSL certificates as bugs in bug bounties? Writing Only Publisher, Number In Stock, and Number Sold Fields. //SORTOUT DD DSN=DEPT.EMPL.DATA.OUTPUT1, Example: PARSE can be used for many different types of variable fields including delimited fields, comma separated values (CSV), tab separated values, blank separated values, keyword separated fields, null-terminated strings, and so on. OUTREC as equivalent of BUILD is only on OUTFIL. EDIT=(TTT.TT) is a used-defined edit mask, in this case inserting a decimal point, truncating the otherwise existing left-most digit, and having significant leading zeros when necessary. . For example: OUTREC BUILD=(DATE3,TIME1,1,6) would produce a character timestamp in output positions 1-12 of the form: yyyydddhhmmss, More easily, you could use DATE4 to produce a timestamp of the form: yyyy-mm-dd-hh.mm.ss or DATE5 to produce a timestamp with microseconds of the form: yyyy-mm-dd-hh.mm.ss.nnnnnn. Build gives you complete control over the items you want in your reformatted OUTREC records and the order in which they appear. SORT FIELDS=COPY It is for copy records to output file. Reformat each record by specifying all of its items one by one. // UNIT=TEST,SPACE=(CYL,(50,10),RLSE) Did any DOS compatibility layers exist for any UNIX-like systems before DOS started to become outmoded? There are two files FILE1.DATA and FILE2.DATA ICETOOL's COUNT operator how long you wanted the output data to be, so Steps to Create the OUTREC Statement for Reformatting Records. Under the OUTREC parameter of the OUTFIL control statement, see [n]/ on page 2.91 for a complete description of the / sub parameter. JOHN MON 08000 In the join keys recently I used, in my work, Inrec, Outrec and Overlay in a sort card. OUTREC gives you the flexibility to reformat your output file in multiple ways . By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Reformat different records in different ways by specifying how build, overlay, find/replace, or group operation items are applied to records that meet given criteria. In the following example an INREC statement will be used to abbreviate each instance of NEW JERSEY and NEW YORK in a record when position 24 of the record contains a X01. The%01parsed field is used to extract the first variable field into a 5-byte fixed parsed field. OUTREC FIELDS=(1,80,SQZ=(..,PREBLANK=C'(),..)) Blanks out the (). Overlay lets you change specific existing columns without affecting the entire record. SORT FIELDS=(1,5,ZD,A) The input file will be sorted first and written to the output. BUILD gives you complete control over the items you want in your reformatted OUTREC records and the order in which they appear. AKSHAY TUE 10000 OUTREC FIELDS= (1:1,20,CTOTAL,26:5Z,31:21,10), SORT FIELDS=COPY All the AMSAM00 records are INCLUDED, everything else (which is unwanted for the OUTFILs) is ignored. Read the answer please. You can use four types of IFTHEN statements as follows: Use one or more WHEN=INIT clauses to apply build or overlay items to all of your input records. Note that if all of the fields in your records have fixed positions and lengths, you don't need to use PARSE. CHANGE=(10 indicates that replacing string will occupy 10 letter positions. OUTREC FILEDS or OUTREC BUILD It is used to reformat each record by specifying all of its items one by one. smith WEDNESDAY 25000 Do you have an example of the input and expected output? Example: OUTREC FINDREP=(IN=Csmall,OUT=CSMALL) finds the text small in the entire input file with the SMALL and writes to the output. is the protected brand of Scrum.org. If your LRECL does not need to be set to a particular If clause 1 is satisfied, its overlay item is applied and processing stops. 3) Sum new PD fields. Example 1: Formating a file(USING OUTREC), SORT FIELDS=COPY - It is for copy records to output file. Example: Reformat each record by doing various types of find and replace operations. Syncsort Manual: Click Here. ICETOOL always calculates the record OUTREC OVERLAY=(..,85:45,3,ZD,MUL,+10,TO=ZD,LENGTH=4) the data from 45th byte multiplies with 10 and writes the result to output of the length 4 from 85th position. OUTREC: Specifies how records are reformatted after they are sorted, copied, ormerged. if WRITE(countdd) is specified. 20 bytes). 1) Sort fields. Data at position 11 in input file will be compared with CHANGE list. WIDTH can only be specified The SORTIN LRECL is 80. JOHN 08000 00001 is the protected brand of Scrum.org. Since the sequence number is not specified for the detail records, it will be blank. . Does a summoned creature play immediately after being summoned by a ready action? length = 30) should be copied at position 1 in output file followed by the sequence number of 5 digit in Zoned Decimal format should be written at position 36 of output file. by specifying an appropriately higher d value for DIGITS(d). I will go through your answer, Multiplication division using DFSORT utility in Mainframe, How Intuit democratizes AI development across teams through reusability. You can use nZ to specify n binary zeros. . IFTHEN clauses let you use sophisticated conditional logic to choose how different record types are reformatted. After step 4) the sign is missing. Presumably your files are quite large? OUTFIL 01, moved to make it easier to follow, gets all the records which are not selected on another OUTFIL (by using SAVE). . Add two days, two years to the date in the input file. Likewise, the sequence number will be 1 for the first trailer record, 2 for the second trailer record and 3 for the third trailer record. Unnecessary fields are eliminated from the output records using INREC or OUTREC. length. Overlay lets you change specific existing columns without affecting the entire record. If clause 3 is satisfied, its build items are applied and processing continues. JIRA Workflow for Optimal Project Tracking, Automatically Assign Issues JIRA Automation, JIRADashboard Popular Gadgets for Agile Teams, Vertical Slice vs Horizontal Slice User Story. Why do we calculate the second half of frequencies in DFT? OUTREC in SORT Using OUREC in SORT JCL OUTREC adds, deletes, or reformats fields after the records are sorted or merged. In fact in DFSORT, BUILD is "aliased" to FIELDS in INREC, OUTREC and OUTFIL (says Frank Yaeger, who should know). To perform lookup of input data and if it matches then replace it with some other data. SUM FIELDS=NONE removes duplicates on fields specified in SORT FIELDS. Batch split images vertically in half, sequentially numbering the output files. Thus total record length of output file is 40. To avoid confusion (due to the "overloading" of OUTREC), don't use OUTREC on OUTFIL, which is for "backwards compatability", use the modern BUILD instead, which is entirely equivalent. This statement supports a wide variety ofparsing, editing, andreformatting tasks. OMIT specifies that reformatted output records with 0 or 9 in position 81 (header or trailer records) and a sequence number in positions 82-83 greater than 1 (second and subsequent header or trailer records), are omitted. OUTREC FIELDS=(..,30,30) Copies the input file data from 30th byte of length 30 copies to output as it is. Staging Ground Beta 1 Recap, and Reviewers needed for Beta 2, How to change the properties of a ps or an pds, Passing symbol value using DFSORT to file, mainframe - generate a report with sum of particular fields. If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community! //SORTOUT DD DSN=DEPT.EMPL.DATA.OUTPUT2, SORT FIELDS= (106,4,CH,A) SUM FIELDS= (162,4,BI,166,4,BI) OUTREC FIELDS= (106,4,162,4,166,4) Table 2 shows the output. . The INREC control statement allows you to reformat the input records before they are sorted, merged, or copied. If you know that your count requires less than 15 digits, you can use The location and length of the number sold field. IFTHEN clauses let you use sophisticated conditional logic to choose how different record types are reformatted. There are multiple Date Functions by which you can reformat input dates. OUTREC is processed after SORT/MERGE and SUM (if present) otherwise after INREC. M11 is a built-in edit-mask. value by not specifying WIDTH(n). Syntax for using FIELDS parameter in its simplest form:-, C ==> indicates the position in output field, P ==> indicates the position of input field, Requirement: To copy all the records from input file to output file. Else, the input record is written to output, as-is. IFTHEN clauses are processed in the following order: For this example, the IFTHEN clauses are processed as follows: PARSE fields using IFTHEN parameter : Click Here. Also this INCLUDE will not give me the file i want. Each FILE DD has only 1 record from the below and all the records are copied to the sortout. Note, the physical order in which these are specified in the JCL does not affect the order they are processed in. C'FRI',C'FRIDAY', - Magic. Lets assume N is 30 days. For example: OUTREC BUILD=(DATE3,TIME1,1,6) would produce a character timestamp in output positions 1-12 of the form: yyyydddhhmmss . count record length does not exceed a specific maximum (for example, OUTREC= (1,10,50,4,40,4) Both examples will reformat the record so that it consists of the first 10 bytes of the input record, followed by the 4 bytes starting at position 50, followed by the 4 bytes starting at position 40. To learn more, see our tips on writing great answers. Syntax for using FIELDS parameter in its simplest form:- OUTREC [FIELDS|BUILD] = ( C:P,M,.) Normally it will be given with Join Keys or during the sort. Input file has one or more records for same employee number. FIELDS specifies an ascending 1-byte character control field at position 81 (the identifier byte added by INREC), and an ascending 5-byte character control field starting at position 8 (the key for the detail records). Use one or more WHEN=NONE clauses to apply build or overlay items to your input records that did not meet the criteria for any of the WHEN=(logexp) clauses. Here is the OUTREC SORT card. 11111AKSHAY HR 10000 - the incident has nothing to do with me; can I use this this way? 15: is "column 15" (position 15) on the record. Selected records will be copied to the output file. vijay SUNDAY 30000. SMITH 25000 . OUTREC FIELDS=(..,5X,..) adds 5 spaces from 63rd position. JCL is for those statements that begin with // like DD, EXEC, JOB, OUTPUT, etc. You can read my previous installment if you miss it. View all posts by Srini. //SYSIN DD * JCL does not have BUILD/OUTREC statements. INREC and OUTREC do the same, but the only difference is the way reformatting is done. I have tried this but get a syntax error: I have managed to sort, sum and edit the data as required. The day-to-day application requirements in a corporate world that can be achieved using Utility Programs are illustrated below: 1. OVERLAY - Replace the selected columns without impacting other columns. OUTREC in SORT JCL - Example 1 If you want to add sequence number to the output data after sorting input data. Don't use INREC FIELDS=, or OUTREC FIELDS= or OUTFIL OUTREC=, use BUILD in their place. 2X in OUTREC FILEDS statement indicates two spaces and thus record length of output file will be 12. /*, ----+----1----+----2----+----3 How can I use SYNCSORT to format a Packed Decimal field with a specifc sign value? OUTREC FIELDS=(..,55,8,Y4W,ADDYEARS,+2,TOJUL=Y4T(/)) adds +2 years to the date in the input file and converts it to Julian date before writing it to output file from 68th position. If clause 4 is not satisfied, its build items are not applied and processing continues. . Inputfile for SORT JCL 10 suresh 20000 01 20120203 34 20 NARENDRA 40000 06 20120925 AB 30 jacob A 25000 07 20111018 1A 40 RAMESH 34000 03 20120610 2C 50 Kishore 50000 02 . The nature of simulating nature: A Q&A with IBM Quantum researcher Dr. Jamie We've added a "Necessary cookies only" option to the cookie consent popup. Example: PARSE can be used for many different types of variable fields including delimited fields, comma-separated values (CSV), tab-separated values, blank-separated values, keyword-separated fields, null-terminated strings, and so on. Is it possible to create a concave light? But if any of the fields in your records have variable positions or lengths, you can use PARSE to treat them as fixed parsed fields in BUILD or OVERLAY. How should I go about getting parts for this bike? Statement SORT FIELDS=COPY is coded to specify that all records should be copied from input file to output file. Agree You can create the reformatted OUTREC records in one of the following ways using unedited, edited, or converted input fields. The problem I am facing is datasets FILE1.DATA.COUNT and FILE1.DATA.COUNT are getting created of 15 record length despite mentioning LRECL 6. 40 RAMESH 34000 03 20120410 50 Kishore 50000 02 20120408. If you use PGM=SORT, for example, that's a utility. However while writing to output file, two spaces will be added between fields at position 1-5 and 6-10. The 0, 1 or 9 identifier byte added in position 81 allows us to sort the header records (0) first, followed by the detail records (1), and then the trailer records (9). The output file will contain the unique employee numbers sorted in ascending order. You can use Z or 1Z to specify a single binary zero. . You can mix p,m fields (fixed fields) and %nn fields (parsed fields) in BUILD and OVERLAY. Letsinsert the below data types between the fields in the output file. . JCL - Examples Example 1: Alocate PS dataset using IEFBR14 UTILITY //STEP01 EXEC PGM=IEFBR14 //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSDUMP DD SYSOUT=* //DD1 DD DSN=userid.IBMMF.PSFILE, // DISP= (NEW,CATLG,DELETE),VOLUME=SER=DEVL, // SPACE= (TRK, (1,1),RLSE),UNIT=SYSDA, // DCB= (DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800) //* If clause 3 is not satisfied, its build items are not applied and processing continues. akshay TUESDAY 10000 So either of the following pairs of control statements will sort your records on input positions 1-6 and reformat them with todays date in the form Cyyyy-mm-dd in output positions 1-10, and input positions 1-6 in output positions 11-16. SECTIONS is used to generate a report header for each transaction. Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. The sort utility you use does have them. If clause 1 is not satisfied, its overlay item is not applied and processing continues. OUTREC control statement is used to reformat (adds, deletes, or reformats fields) each record after they are sorted, merged, or copied by specifying all of its items one by one. My code is GPL licensed, can I issue a license to have my code be distributed in a specific MIT licensed project? VIJAY SUN 30000, //SORTSTEP EXEC PGM=SORT OUTFIL 03 gets all the not 0000s which are not 'Y'. example, if DIGITS(10) is specified, 10 digits are used instead of 15. If clause 2 is not satisfied, its build items are not applied and processing continues. Why did Ukraine abstain from the UNHRC vote on China? OUTREC is processed after SORT/MERGE and SUM (if present) otherwise after INREC. Build gives you complete control over the items you want in your reformatted OUTREC records and the order in which they appear. Write unique records to output. Example: OVERLAY: Reformat each record by specifying just the items that overlay specific columns. The DATE1(-)-30 operand corresponds to a Cyyyy-mm-dd constant for todays date minus 30 days. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. In the above example, employee number is in the field position 1,15. To include a single apostrophe in the string, you must specify it as two single apostrophes example, to include the word Toms you need to specify CToms. If there is no match found NOMATCH=(11,3) , data at 11th position of input file will be copied as it is to output file. 1,6,ZD means "the information, at this moment, at start-position one for a length of six, which is a zoned-decimal format". OUTREC BUILD=(1,10,TRAN=UTOL,11,3, - You can assign up to 1000 parsed fields (%0-%999) to the variable fields you want to extract. Overlay lets you change specific existing columns without affecting the entire record. Also skills in Mainframe. For the input record: NEW YORK,ABC NEW JERSEY,XYZ,NEW YORK, The output record would contain: NY,ABC NJ,XYZ,NY. Note that if all of the fields in your records have fixed positions and lengths, you dont need to use PARSE. Is it suspicious or odd to stand by the gate of a GA airport watching the planes? What is \newluafunction? C'TUE',C'TUESDAY', - The thing is, it can be further simplified by doing something else. Example 1: Formating a file (USING INREC) //SYSIN DD * SORT FIELDS=COPY INREC FIELDS= (7:2,5,20:10,3) /* Explanation: SORT FIELDS=COPY It is for copy records to output file INREC FIELDS= (7:2,5,20:10,3) - Here we have two formattings, 7:2,5 - data at 2nd position of input file with length 5 copied to 7th position of output file Convert the date from mmddccyy to ccyymmm(julian date). OUTREC OVERLAY=(30:30,4,TRAN=LTOU,..) Converts the data lower to upper from 30th position of length 4 and writes to output from 30th position. For details of what that mask is, look it up in the manual, as you will discover other useful pre-defined masks at the time. Using BUILD on INREC, OUTREC and OUTFIL, and not using OUTFIL OUTREC= is simply for clarity. BUILD exists on INREC, OUTREC and OUTFIL, separately and as part of an IFTHEN. JOINKEYS specifies the field on which the two files are compared. BUILD gives you complete control over the items you want in your reformatted OUTREC records and the order in which they appear. It should be: Code: INREC FIELDS= (.) Do new devs get fired if they can't solve a certain bug? Requirement: To display hexadecimal representation of input value. This sort card will insert 4 binary zeroes between the first and second fields of your output file. @zarchasmpgmr: JCL does not allow multiple BUILD/OUTREC statements. Example MON will be replaced by MONDAY. INREC:Specifies how records are reformatted before they are sorted, copied, or merged. If clause 2 is satisfied, its build items are applied and processing continues. 1,6,ZD,DIV,+2 means "take the six-digit number starting at position one, and divide it by two, giving a 'result', which will be placed at the next available position (16 in your case). This enables all the records in a group to be sorted together. If WIDTH(n) is not specified, LRECL is set to the calculated required Alternatively, something has already previously read or written those files. WHEN=NONE clauses are processed after any of the other IFTHEN clauses. It is as I said, it replaces the data. Based on the 6th position of the file, the BUILD of output file varies. IFTHEN statements allow you to reformat different records in different ways by specifying how build or overlay items are to be applied to records that meet given criteria. You can use X or 1X to specify a single blank. If your logic is wrong, that'd be the problem. LENGTH=6 limits the result to six digits. The%parsed field is used to skip the variable field without extracting anything for it. For PUSH extends each record by placing the date and register number from the header record at the end of each record in the group, followed by a 5-byte group number and a 3-byte record sequence number. 5) Create output record with fewer fields. Overlay lets you change specific existing columns without affecting the entire record. My approach has to be execute a statement check the results then add the next statement. PMP, PMBOK, PMI-ACP and PMI are registered trademarks of the Project Management Institute, Inc. Professional Scrum Master, PSM, Professional Scrum Product Owner, PSPO etc. You can prevent the overflow You can delete, rearrange and insert fields and constants. Align the data in the first 29 bytes to LEFT and replace () with <>. OUTREC FIELDS=(1,5,2X,6,10), SORT FIELDS=COPY Asking for help, clarification, or responding to other answers. // DCB=(RECFM=FB,LRECL=30,BLKSIZE=0), Replace Low Values with Spaces using SORT, JIRA Workflow for Optimal Project Tracking, Automatically Assign Issues JIRA Automation, JIRADashboard Popular Gadgets for Agile Teams, Vertical Slice vs Horizontal Slice User Story. I want to create 3 outfiles depending on the below INCLUDE criteria from the input file. . Build give complete control over output file format. You can read my previous installment if you miss it. Please do not use JCL as a general term for utilities. Lots of errors here. OUTREC FIELDS=(1,39,..)copies first 39 bytes from input file to output as it is. TRAN=LTOU, can be used to convert data from lower case to upper case . // UNIT=TEST,SPACE=(CYL,(50,10),RLSE) Example: Reformat each record by specifying just the items that overlay specific columns. JOHN 08000 Thus total record length of output file is 30. OK, perhaps 7.3m is not so large, but, when you have your "solution", the next person along is going to do it with 100,000 records, the next with 1,000,000 records. Linear regulator thermal information missing in datasheet. //SYSPRINT DD SYSOUT=* Statement OUTREC FIELDS=(1:1,30,36:SEQNUM,5,ZD), is used here to indicate that field at position (1 to 30 i.e. SORT FIELDS=( logically appears after the INCLUDE (wherever you code it) and by using OPTION COPY it is clear, up front, and in a logical place, that it is a COPY operation. This statement supports a wide variety of parsing, editing, and reformatting tasks. Although you may invoke it via JCL, it is NOT JCL. Include 3 is doing the same except excluding 1 and 2 includes. @Bill my both input files has approx 10000 records. One way, if on-the-dot accuracy is not required, is to talk to the technical staff who manage your storage. This sort card will insert spaces in the first 20 bytes, then the fields 1 to 5 from the input file are moved to 21 thru 25, 26 thru 36 will have blanks and then input file fields from position 6 to 10 is moved to output file positions 37 to 41. The overlay will be occurredin the final output record. Why is there a voltage on my HDMI and coaxial cables? LRECL to the calculated record length. JOHN 28000, //SORTSTEP EXEC PGM=SORT Not the answer you're looking for? Reformat each record by specifying all of its items one by one. Use IFTHEN statements if you want to insert, rearrange, delete or overlay fields in different ways for different records. INREC FIELDS=(1,20,X,25,6,X,) - Reformat the input file of length 1 to 30 bytes(1 to 20 bytes plus 25 to 6 bytes). The number in stock and number sold fields are binary values which would actually be unreadable if you printed or displayed the output records shown in Table 2. IBMMainframes.com is not an official and/or affiliated with IBM. Example: Reformat different records in different ways by specifying how build, overlay, find/replace, or group operation items are applied to records that meet given criteria. Specifies the record length and LRECL you want ICETOOL to use for the // DISP=(,CATLG,DELETE), default of 15 digits. AKSHAY 10000 . Multiple output records are created with the / sub parameter. and what would happen then? REFORMAT FIELDS=? If, as in the second question above, you wanted to produce just one record containing the date, you could select from a variety of date formats. Build gives you complete control over the items you want in your reformatted OUTREC records and the order in which they appear. john MONDAY 08000 . You can delete, rearrange and insert fields and constants. Explnation: In above case all records will be copied from input file to output file. Default for PARSE: None; must be specified. OUTREC FIELDS=(..,4X,..) add 4 spaces from 40th byte. Please do not use JCL as a general term for utilities. But if any of the fields in your records have variable positions or lengths, you can use PARSE to treat them as fixed parsed fields in BUILD or OVERLAY. Example: FINDREP: Reformat each record by doing various types of find and replace operations. Reformatting Records Using OUTREC - Part 2 We will explore few more common uses of OUTREC with examples below 1 . value, you can let ICETOOL determine and set the appropriate LRECL REMOVECC removes the ANSI carriage control characters and ensures that the RECFM is FB rather than FBA. How do I align things in the following tabular environment? OUTREC FIELDS=(..,45,3,ZD,MUL,+10) data starts from 45th byte of length 3 will be multiplied by +10 and stores it in the same record as a continuation. The question is unclear, so this is just a guess at what was wanted. The answer to your first question is simply that you did not tell FIELDS is "old" and available for backwards-compatibility. //SYSPRINT DD SYSOUT=* IN identifies the constant (the find constant) and OUT identifies the constant (the replace constant). The option STOPAFT will stop reading the input file after 10th record and terminates the program. Using OUREC in SORT JCL - Example. Use a WHEN=ANY clause after multiple WHEN=(logexp) clauses to apply additional build or overlay items to your input records if they satisfied the criteria for any of the preceding WHEN=(logexp) clauses. //SYSOUT DD SYSOUT=* Explnation: Above statement will convert data field at position (1-20) of input file to its uppercase form and write it to output file. One step to take the larger (expectation) of the two counts, "work out" what 00% would be (doesn't need anything but a simple subtraction, with the right data) and generate a SYMNAMES format file (fixed-length 80-byte records) with a SORT-symbol for a constant with that value. Follow Up: struct sockaddr storage initialization by network format-string. JOHN THU 28000 Following records will be selected from the input file. // UNIT=TEST,SPACE=(CYL,(50,10),RLSE) You can assign up to 1000 parsed fields (%0-%999) to the variable fields you want to extract. //SORTOUT DD DSN=DEPT.EMPL.DATA.OUTPUT2, Using Kolmogorov complexity to measure difficulty of problems? Formatting output file after an INCLUDE condition in JCL, How Intuit democratizes AI development across teams through reusability. The OUTREC control statement allows you to reformat the input records after they are sorted, merged, or copied. Your comment must have arrived while I was writing the answer. What is issuing the message? This will make the whole process inefficient. Example: Reformat each record by specifying just the items that overlay specific columns. 7thbyte will be placed as a space in output file. Minimising the environmental effects of my dyson brain. Example: Experienced software developer. OUTREC FIELDS=(..,6,73)copies the input file data from 6th byte to the output file from 8th byte onwards as it is. Next . DFSORT/SYNCSORT or a subsequent program reading the files? Identify those arcade games from a 1983 Brazilian music video, AC Op-amp integrator with DC Gain Control in LTspice. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. As a mainframe resource, if you have command on DFSORT you will get many job opportunities. Build parameter can be used in OUTFIL statement also. INREC OVERLAY operation is used in order to rewrite data in input file before copying to output. The advantage of the above types of solution is that they basically use very few resources. Following records will be selected from the input file. length required to write the count record and uses it as follows: v If WIDTH(n) is specified and the calculated record length is less By using INREC, OUTREC, and OUTFIL statements to insert the current date or past date, or future date in a variety of formats and time in a variety of formats into your records. ICETOOL sets the attributes of the count data set as follows: If WIDTH(n) is specified, LRECL is set to n. Use WIDTH(n) if your count Amusing. Display Filter View Print Options Help, WER268A SORT STATEMENT : SYNTAX ERROR, ****** ***************************** Top of Data ******************************. What are the RECFM and LRECL of your inputs? On the Mainframe, the client pays for resources. FINDREP indicates doing a find and replace operation. BUILD operand is used to construct the output record. john THURSDAY 28000 Obviously I have a lot of catching up to do! For example, if you wanted to create a record with just Cdddyy, you could do it with OUTREC as follows: Lets say we have a Cyyyymmdd date field starting at position 10 of each record.