Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ISPF editing

Status
Not open for further replies.

Newbie2u

MIS
Apr 13, 2003
5
0
0
US
One Input dataset with several (could be hundreds) lines of data in pre formatting fields.
One output dataset as a resutls of ISPF edits.

Example of input:
Col 1-4 department
Blanks col 5-10
Col 10-25 Person's name
Col 26-133 junk

Question for rexx:
I can use an isredit for columes 26-133 to create blanks (as I want).
I can use isredit for filling in other blanks with info.

But how do I move the Person's name in colume 10-25 to colume 5-20.
If I can make that my first change, I can change the other data as I want it.

Can you offer any assistance...
Thank you in advance.
 
Hola.

Si quieres cambiar cualquier caracter por otro el comando es el siguiente

___ English

Hello
If you want to change any character by another the command is the next.

ADDRESS ISREDIT
"MACRO"
"c p'¬' c' ' 26 133 all"

And so.
"c p'¬' c'This is a proof' 26 133 all"

 
But what I need is to reposition one existing colume.
Blank everything out except for one field (colume) repostion that field.

But how do I move the Person's name in colume 10-25 to colume 5-20.

Thanks!

 
Assuming the layout is how you have said I would use WORD, personally

fname = WORD(2,line.0)
lname = WORD(3,line.0)

(assuming line was used when reading the input file)

then I would code:

OUTLINE.0 = " "||fname||" "||lname

 
I appreciate all your help, but golly. I am still stuck.
I still want to move data.

Example:

1011 John Smith junk field
1021 Jan Doe junk fields
colume 1-4 10-25 26-133

I want to move the name (as one field) to be repositioned in columne 5-20.

I can't seem to figure it out. Thanks so much.
 
Hello,

Try this code:


ADDRESS ISREDIT
"MACRO PROCESS"
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"

/***********************************************/
/* BEGIN PROCESSING */
/***********************************************/

"(I) = LINENUM .ZL"
"(S) = LRECL"

DO V = 1 TO I
"(DATA1) = LINE " V

TEMP = SUBSTR(DATA1,1,4) !! SUBSTR(DATA1,7)
TEMP = LEFT(TEMP,S," ")
" LINE "V" = (TEMP)"

END

EXIT

I tried a little test.

Before :
1011 JOHN SMITH JUNK FIELD
1021 JAN DOE1 JUNK FIELDS1
1023 JAN DOE2 JUNK FIELDS2
1024 JAN DOE3 JUNK FIELDS3
1025 JAN DOE4 JUNK FIELDS4
1026 JAN DOE5 JUNK FIELDS5

After :
1011JOHN SMITH JUNK FIELD
1021JAN DOE1 JUNK FIELDS1
1023JAN DOE2 JUNK FIELDS2
1024JAN DOE3 JUNK FIELDS3
1025JAN DOE4 JUNK FIELDS4
1026JAN DOE5 JUNK FIELDS5

 
Thank YOu! Thank you! That works.

Question?

If I create a REXX shell to pull in JCL to modify (like a few replacement commands for certain text in the jcl) do I have to bring in every line of the JCL into the REX exec? Does someone have a simple example. Thank you, I appreciate it.
 
As the title says "ISPF Editing" I think it is safe to assume that you are running under ISPF, so I would take a look at ISPF Skeletons (ISPSLIB), it will do exactly what you wish. :)

Here is a quick sample.

Skeleton JCL: member(test01)

//TRY&LGQM EXEC PGM=QMSTAT,PARM='&LGQM'
//REVERSE DD DUMMY
//MQM&LGQM EXEC PGM=CSQJU004,COND=(0,NE)
//STEPLIB DD DISP=SHR,DSN=SYS1.SCSQANLE
// DD DISP=SHR,DSN=SYS1.SCSQAUTH
//SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=629
//SYSUT1 DD DISP=SHR,DSN=SPD2.&LGQM..BSDS01

To use it code

'FTOPEN'
'FTINCL JOBCARD'
'FTINCL TEST01'
'FTCLOSE'

Good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top