How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length ----TRY



How to remove the spaces at end of each record in the output file Via COBOL program? note: The file ..

Answer / Sachin Kumar Mourya

In COBOL, you can use the TRIM function or the MOVE statement with space-suppressed processing (SSP) to remove trailing spaces from records. Here is an example using SSP:nn 01 Record PIC X(VB).n PROCEDURE DIVISION.n MOVE SPACE TO Record.n ACCEPT Record.n DISPLAY TRIM(Space-Suppressed Record).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JCL Interview Questions

Explain about LMINIT - generate a data ID for a data set

1 Answers  


when GDG version number get changed ? bcz always Generations only increasing.

1 Answers   Cap Gemini,


What are the rules employed while naming the steps in a job?

1 Answers  


How can I override a dsn that is contained in a proc called by another proc? I need to do the override in the calling JCL.

3 Answers  


A file has dta in S9(09) COMP format. How do I move the data into a character field X(10)?

2 Answers  


How many types of parameters are used in JCL and what are mandatory parameters of JOB statement.

13 Answers   IBM,


Explain in DD statement what is the use of DCB parameter?

1 Answers  


which parameter is used to check the syntax of a jcl without executing it?

1 Answers   IBM,


how to run JCL thru COBOL.

1 Answers   Patni,


A maximum of 100 chars can be passed to Cobol through Parm in JCL, If we want to pass more than 100 Chars how we can do it ?

3 Answers   IBM,


AM HAVING A FILE WHICH CONTAIN 12 DATS OUT OF WHICH 4 ARE DUPLICATES HOW TO REMOVE THE DUPLICATE FILES IN JCL? CAN I GET THE PROGRAM FOR THIS

3 Answers  


have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file

1 Answers  


Categories