View previous topic :: View next topic
|
Author |
Message |
Deepika Pai
New User
Joined: 13 May 2010 Posts: 7 Location: India
|
|
|
|
Hello,
I have situation where I have an IFTHEN when=group, BEGIN=(6,6,CH,EQ,C'CALL') and I want to end when it finds a period.But since the position of a period might vary from 6 to 72 in a COBOL program. How I can check for a contains clause in END= clause?
Thanks! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you post some sample "input" source code and how you want your process to work with the sample code. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
Deepika Pai wrote: |
Hello,
I have situation where I have an IFTHEN when=group, BEGIN=(6,6,CH,EQ,C'CALL') and I want to end when it finds a period.But since the position of a period might vary from 6 to 72 in a COBOL program. How I can check for a contains clause in END= clause?
Thanks! |
Which version of cobol lets you code a CALL statement in position 6?
You can use SS format for the variable string search.
Assuming the call statement is always in position 8, the following DFSORT JCL will give you the desired results
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
CALL PROG-A.
DONT TAG THIS LINE
CALL PROG-B
TAG ME LINE.
CALL PROG-C
TAG LINE1
TAG LINE2.
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=GROUP,BEGIN=(8,4,CH,EQ,C'CALL'),
END=(8,64,SS,EQ,C'.'),PUSH=(40:ID=2))
//* |
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
a line in a COBOL source program
(to repeat and paraphrase what is stated in the manuals)
is:
1-6 unused by compiler
7 used by either comment or debug notation
8-71 contains data description entries or procedure division entries
72-80 unused by compiler
1-6 and/or 72-80 can be line numbers depending upon the edit profile usage.
as Kolusu asked, why are you looking in card-column 6 for anything? |
|
Back to top |
|
|
|