Function reverse cobol
WebThe code basically does the following: 1) It reverses the string using the REVERSE Intrinsic function. 2) The INSPECT verb is used to count the number of leading spaces. 3) The number of leading spaces is subtracted from the total size of the variable. Here is a small example that illustrates the idea: working-storage section. WebREVERSE FUNCTION: If you need to reverse the data in a field you can use the REVERSE function. This means if the data was entered as XYZ, the new field will now be ZYX. …
Function reverse cobol
Did you know?
WebYou can accomplish what you are trying to do by type-laundering the literal through a function. You can then substring, or reference modify, the output of the function. Consider that calling reverse twice on the same data returns the original data. Move function reverse ( function reverse ( 'abcdefg' ) ) (3:1) to text-out WebIf anybody's confused about the FUNCTION REVERSE method, comments have been around for a very long time in COBOL, and even "inline" comments are now available. the dCOBOL's basic power increased rather than NEW FEATURES being added rather than alternative ways of doing the same thing. , and only microscopically-different resource …
WebMar 20, 2009 · INSPECT FUNCTION REVERSE (WS-STRING) TALLYING WS-CNT UNTIL INITIAL SPACE. I've not tested this as i'm not connected to a mainframe just now. 2.Can anyone help to remove the trailing blanks in ws-string. No. You might ignore them, but the data positions will still exist. What would you put in those positons if the blanks rwere … http://www.techtricky.com/cobol-inspect-verb-usage-syntax-with-examples/
WebFollowing are the details of the used parameters −. ws-string1 and ws-string2 : Input strings to be concatenated. ws-string : Output string. ws-count : Used to count the length of new concatenated string. Delimited specifies the end of string. http://www.pgrocer.net/Cis52/functions.html
WebAnswers were Sorted based on User's Feedback. how we can reverse the string in the cobol for example satheesh can be reveresed as hseehtas.. data division. 01 ws-input …
WebDec 15, 2024 · Dec 15, 2024 at 18:31 Concerning "standard-COBOL" you'd write your own FUNCTION because of the MON part. possibly similar as you did. For the returning value you can use the FORMATTED-DATE function, but there is no "standard" "any string in any language to month". – Simon Sobisch Dec 16, 2024 at 7:08 Add a comment 1 Answer … blue ridge wilderness nyWebAug 7, 2024 · INSPECT FUNCTION REVERSE (ww-in-strng2) TALLYING WA-CNT2 FOR LEADING SPACES Here it calculates all the spaces before it finds any character, in this … clear out macbook proWebMay 25, 2006 · The LENGTH is a function that returns an integer equal to the length of the argument in bytes. The function type is integer. and it returns a 9 bytes integer. While LENGTH OF is an special register, 4 bytes in size i dont know the exactly purpose of this register. may be it is used to store length of variables. clearout nihttp://computer-programming-forum.com/48-cobol/bfb93cb413c87cc6.htm clearout mr priceWebJun 20, 2004 · Inspect will replace one string with another of the same size. Look at using the command string in conjunction with command unstring. Somehing on these lines. loop until no more text to separate. move spaces to fieldy. unstring fieldx delimited by all spaces into fieldy. pointer pointer1. clear out microsoft teams cacheWebSep 30, 2006 · Can some one help me, are there any other statement other than the below statement to generate a REVERSE OF A STRING. Move FUNCTION REVERSE … clear out mr price johannesburgWebFeb 2, 2010 · I just tested googling with cobol perform varying and the first link returned contains this sentence Quote: ... And after four years, a doubt about how to traverse an array in a reverse order. I guess traversing in an array was something i did in my school days !!!! I am not trying to offend the person who posted this. blue ridge wilderness program