01 text-data pic x(100).
move 'xyzdbfrjjg u' to text-data.
how to find the value of last index of text-data?
Answers were Sorted based on User's Feedback
Answer / billyboyo
Presumably you mean the last character? Redefine the field
as OCCURS 100 PIC X. Start your subscript/index at
the "end" and work backwards to find the first non-blank
character. Careful if the whole field is blank, or if there
are no blanks.
| Is This Answer Correct ? | 3 Yes | 0 No |
cana ny one post a code for that ,
thanks in advance
krishna
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / kumar
By using UNSTRING Verb we can do
UNSTRING text-data DELIMITED BY ' ' INTO ws-f1 (o/p varible)
| Is This Answer Correct ? | 0 Yes | 1 No |
What is mean by maxcc
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
01 x pic s9(8) comp. How will the following value be internally allocated '18787'
What compiler option would you use for dynamic linking?
What are the different rules of SORT operation?
In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference
I want ALL jcl ERROR cods
How to solve SOC7. I have the cobol coded as below 01 A PIC 9(4). 01 AIN REDEFINES A. 05 AIN1 PIC S9(4) 01 B PIC 9(4)V99. 01 BIN REDEFINES B. 05 BIN1 PIC S9(4)V99. PROCEDURE DIVISION. START-PARA. INITIALIZE A AIN B BIN. ACCEPT A B. DISPLAY 'VALUE OF A=' A. DISPLAY 'VALUE OF B=' B. DISPLAY 'VALUE OF BIN1=' BIN1. DISPLAY 'VALUE OF AIN1=' AIN1. COMPUTE AIN1 = BIN1 - AIN1. DISPLAY 'VALUE OF AIN1=' AIN1. When i'm executing this code i'm getting SOC7 for A = 12 & B=34. Can someone explain SDSF OUTPUT DISPLAY TCOM058R JOB05458 DSID 102 LINE 0 COLUMNS 02- 81 COMMAND INPUT ===> SCROLL ===> CSR ********************************* TOP OF DATA ********************************** VALUE OF A=12 VALUE OF B=34 VALUE OF BIN1=34 VALUE OF AIN1=12 CEE3207S The system detected a data exception (System Completion Code=0C7). From compile unit PROG1 at entry point PROG1 at statement 29 at compile +000004CE at address 00007ECE. Please address how to solve this issue Thanks in advance.
I have the file which is having the extension no as records. sample file will look like below. 2310 3410 3256 4350 3781 5408 I need to replace the record which is starting with 3 to 5 (i.e) 3410 to 5410. How can we do it through cobol and cobol-db2 program? I need the possible logic?
How many maximum number of procedures can we write in one COBOL program?
hi. This is Ram.i have one doubt.why can't we display comp-3 variables directly? let me answer quickly plez........
Difference between cobol and cobol-ii?