February 7, 2012 – 3:06 pm
As you would expect, GOTO statement just transfers control directly to the label specified. Below example explains that. LIST ON JOB INPUT NULL DISPLAY ‘ONE’ GOTO LINE-FOUR DISPLAY ‘TWO’ DISPLAY ‘THREE’ LINE-FOUR DISPLAY ‘FOUR’ STOP Output from this will be ONE FOUR
January 29, 2012 – 5:19 am
You can Sort a file into another file in Easytrieve. The Syntax is SORT file-name-1 + TO file-name-2 + USING (field-name [D]…) + [BEFORE proc-name] file-name-1 is the input file DD Name file-name-2 is the Sorted output file field-name is the field defined in file-name-1, based on which the file has to be sorted If [...]
January 28, 2012 – 7:49 am
have you already read Easytrieve Variable declaration? For creating reports, or printing (displaying) numeric variables, we will always need masking. It can be used to print the decimal character for the variables that have implied decimal WS-SSN W 9 N MASK ’999-99-9999′ … MOVE 123456789 TO WS-SSN DISPLAY ‘ WS-SSN : ‘ WS-SSN This will [...]
January 28, 2012 – 7:09 am
DISPLAY statement in Easytrieve is exactly the same as in COBOL. WS-VAR1 W 20 A VALUE ‘I AM INITIALIZED HERE’ … DISPLAY ‘value of WS-VAR1 is: ‘ WS-VAR1 This will be printed as value of WS-VAR1 is: I AM INITIALIZED HERE If you want to continue the DISPLAY statement in multiple lines, use ‘+’ symbol [...]
January 28, 2012 – 6:54 am
have you already read Easytrieve Variable declaration? Initialising a variable in Easytrieve, can be done using VALUE Clause. WS-VAR1 W 20 A VALUE ‘I AM INITIALIZED HERE’
October 1, 2011 – 1:00 pm
Updating/ REWRITING a VSAM record: VSAM declaration should look like, FILE FILE2 VS UPDATE FILE2 is the DD name – must have DISP=OLD Reading VSAM file by Key and updating the record —-+—-1—-+—-2—-+—-3—-+—-4—-+—-5—-+—-6—-+—-7– LIST ON FILE FILE1 FB(80 200) IN-REC 1 80 A IN-KEY 1 8 A FILE FILE2 VS UPDATE F2-REC 1 18 A [...]
September 29, 2010 – 2:39 pm
Job statement is the main section or Procedure division of the easytrieve. Let us see the different types of JOB statements. JOB INPUT NULL If you want to process the files yourself and you dont want the Easytrieve to read/match files for you, please use JOB INPUT NULL. e.g, —-+—-1—-+—-2—-+—-3—-+—-4—-+—-5—-+—-6—-+—-7– LIST ON FILE INFILE FB(80 [...]
September 21, 2010 – 3:55 pm
Easytrieve MACROs are similar to COBOL Copybooks. i.e, they are used to reuse the layout of a file. A Sample Macro: MYDATA.SET.MACROS(MYFILE) MACRO INFILE IN-REC 1 80 A IN-KEY 1 8 A The first line of a Macro should be MACRO. How to use this in an Easytrieve program? —-+—-1—-+—-2—-+—-3—-+—-4—-+—-5—-+—-6—-+—-7– LIST ON FILE INFILE FB(80 [...]
September 20, 2010 – 3:28 pm
have you already read Easytrieve Variable declaration? In COBOL, REDEFINES verb can be used to declare variables that share a same memory location. In Easytrieve also, there is a similar functionality. For example, the ALPHA and NUMERIC variables given below share the same 5 bytes. WS-ALPHA W 5 A WS-NUMERIC WS-ALPHA 5 N Since the [...]
September 20, 2010 – 3:18 pm
This post is a part of Easytrieve variable declaration. You can read it first. As in COBOL, OCCURS clause can be used to declare an Array in Easytrieve also. Below is a sample program. —-+—-1—-+—-2—-+—-3—-+—-4—-+—-5—-+—-6—-+—-7– LIST ON FILE INFILE WS-ALPHA W 26 A VALUE ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’ WS-ALP-ARR WS-ALPHA 1 A OCCURS 26 INDEX ALPHA-NDX * JOB [...]