Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Adding cobol display after every para through rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
akhil_rai

New User


Joined: 15 Jul 2010
Posts: 3
Location: kolkata

PostPosted: Thu Jul 15, 2010 12:49 pm    Post subject: Adding cobol display after every para through rexx
Reply with quote

Hi all,
I want to add display statement after every para thrugh rexx for cobol program testing.For example

2551-TITULO-SUC.
MOVE 264 TO SIS-NUMER.
MOVE 10 TO SIS-PRG-NP.
MOVE 71 TO CLAVE-RANGO-L100.
MOVE 0 TO CLAVE-NUEVA-L100
for this para I want Rexx to scan from 8th line for a single word ending with a full stop and display "Inside 2551-TITULO-SUC para" So please help me for achieving this.
Back to top
View user's profile Send private message

bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 210
Location: Cochin/Kerala/India

PostPosted: Thu Jul 15, 2010 12:54 pm    Post subject:
Reply with quote

Hi Akhil,
I'll give some hints,

a) Yoy have to write one edit macro which is needs to execute after opening your cobol code.
b)In the edit macro, you have to read your program and scan each line(you can use the STEM logic).
c) Once you got the Para name you can insert the line in Cobol code.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 15, 2010 12:54 pm    Post subject:
Reply with quote

Not too sure that you have described your requiremnt too clearly.
Is it after every PARA that you want to display, or only a selected PARA.
Is there (not being a COBOLER) something that designates a new paragraph in the code.
Please elaborate and give an example of the COBOL code for us non proggies. - Also to use the code tags
Code:
 
[code]  Your code here [/code]
Back to top
View user's profile Send private message
akhil_rai

New User


Joined: 15 Jul 2010
Posts: 3
Location: kolkata

PostPosted: Thu Jul 15, 2010 1:00 pm    Post subject:
Reply with quote

My program is of 1,20,000 lines having at least 400 paras so I want display in every paragraph.I am new to rexx .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 15, 2010 1:08 pm    Post subject:
Reply with quote

bipinpeter wrote:
b)In the edit macro, you have to read your program and scan each line(you can use the STEM logic).
Why bother reading the whole file when ISPF "F" will find what is required. This approach is only used when a file is too large to edit directly in ISPF - although I may tend to use a different approach in that situation.

@ akhil_rai
Please read my previous post and supply the requested information. I DO NOT want the whole code, just enough so that I as a non COBOLER can see how to distinguish a paragraph start / end. As previously explained.
Back to top
View user's profile Send private message
akhil_rai

New User


Joined: 15 Jul 2010
Posts: 3
Location: kolkata

PostPosted: Thu Jul 15, 2010 1:13 pm    Post subject:
Reply with quote

it is a sample two para codes, first 6 colms are for tags seventh column * comments the whole line and from the 8th column the definition of para begins I want to check the flow of whole program through these paras.I have to manually insert display statements after every para.Para declaration ends with a . and it is a single word starting from 8th column.


Code:
209700 2102000-SAMPLE-1.
209800*=====================
209900     IF STATUS = 10 OR 21 OR 40
210000        IF FE-DATE < WKS-DATE
210100           IF VALUE-1 < 20
210200              ADD      1              TO WKS-ACS-2301R
210300              ADD IMPORT         TO WKS-ACS-2301I
210400           ELSE
210500            IF VALUE-1 < 30
210600               ADD      1             TO WKS-ACS-2302R
210700               ADD IMPORTE        TO WKS-ACS-2302I
210800            ELSE
210900             IF VALUE-1 < 40
211000                ADD      1            TO WKS-ACS-2304R
211100                ADD IMPORT       TO WKS-ACS-2304I.
211200
211300     PERFORM                          PARA-1.
211400     MOVE WKS-IMPORTE                 TO IMPORTE.
211500     MOVE 1                           TO WKS-I.
211600     PERFORM                          PARA-2.
211700*
211800 PARA-1.
211900*=======================
212000     IF VIG-STATUS = 20
212100        MOVE DATE-1              TO DATE-2
212200        MOVE PAGO             TO WKS-PAGO.
212300        MOVE 1                        TO A01-STATUS.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 15, 2010 1:24 pm    Post subject:
Reply with quote

Do you notice how much easier your code is to read after I applied the code tags previously mentioned.

Click HERE to see an example of a basic REXX / ISPF edit macro to do almost what you want to do.

I know that you will probably have difficulties in understanding the code first time out, so try and understand it and come back with some more questions once you have tried a few things.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Thu Jul 15, 2010 1:27 pm    Post subject:
Reply with quote

do a search on member
Anuj Dhawan
who wrote a rexx for this very purpose,
and recently had to provide support to another rookie
who could not manage on his own to accomplish this.

oh, and the next time you post code, use BBcode to perserve the spacing . what you have there is difficult to read,
and one can not tell that only the paragraphs begin in column 8.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Thu Jul 15, 2010 4:24 pm    Post subject:
Reply with quote

you can start with this link
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Jul 15, 2010 5:23 pm    Post subject:
Reply with quote

You may also use DISPARA (available at file 357 in CBT).

O.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us