I am doing a tool using RExx and ISPF dialog.i am transferring a file from Pc to notepad usually will do by using option 6, am trying in using RExx.
I am getting error ISPP277
Panel 'XPORTPAN' error
First line of an area must identify the left and right boundaries.
My panel code is
)PANEL
)ATTR
+ TYPE(WASL) GE(ON)
~ TYPE(OUTPUT) CAPS(OFF)
# TYPE(TEXT) COLOR(TURQ)
% TYPE(INPUT) COLOR(TURQ) CAPS(OFF)
| AREA(DYNAMIC)
/ TYPE(CHAR) GE(ON) COLOR(YELLOW)
¢ TYPE(DATAOUT) COLOR(TURQ)
A TYPE(CHAR) COLOR(TURQ)
R TYPE(CHAR) COLOR(RED)
T TYPE(CHAR) COLOR(TURQ) HILITE(USCORE)
W TYPE(CHAR) COLOR(WHITE)
)BODY CMD(MYCMD) ASIS
|ZDATA01,ZSHAD01
|ZDATA02,ZSHAD02
|ZDATA03,ZSHAD03
|ZDATA04,ZSHAD04
|ZDATA05,ZSHAD05
|ZDATA06,ZSHAD06
|ZDATA07,ZSHAD07
|ZDATA08,ZSHAD08
|ZDATA09,ZSHAD09
|ZDATA010,ZSHAD010
|ZDATA011,ZSHAD011
|ZDATA012,ZSHAD012
|ZDATA013,ZSHAD013
|ZDATA014,ZSHAD014
|ZDATA015,ZSHAD015
|ZDATA016,ZSHAD016
|ZDATA017,ZSHAD017
%MYCMD
)PROC
&RESPONSE = .RESP
)END
)ATTR
+ TYPE(WASL) GE(ON)
~ TYPE(OUTPUT) CAPS(OFF)
# TYPE(TEXT) COLOR(TURQ)
% TYPE(INPUT) COLOR(TURQ) CAPS(OFF)
| AREA(DYNAMIC)
/ TYPE(CHAR) GE(ON) COLOR(YELLOW)
¢ TYPE(DATAOUT) COLOR(TURQ)
A TYPE(CHAR) COLOR(TURQ)
R TYPE(CHAR) COLOR(RED)
T TYPE(CHAR) COLOR(TURQ) HILITE(USCORE)
W TYPE(CHAR) COLOR(WHITE)
)BODY CMD(MYCMD) ASIS
|ZDATA01,ZSHAD01
|ZDATA02,ZSHAD02
|ZDATA03,ZSHAD03
|ZDATA04,ZSHAD04
|ZDATA05,ZSHAD05
|ZDATA06,ZSHAD06
|ZDATA07,ZSHAD07
|ZDATA08,ZSHAD08
|ZDATA09,ZSHAD09
|ZDATA010,ZSHAD010
|ZDATA011,ZSHAD011
|ZDATA012,ZSHAD012
|ZDATA013,ZSHAD013
|ZDATA014,ZSHAD014
|ZDATA015,ZSHAD015
|ZDATA016,ZSHAD016
|ZDATA017,ZSHAD017
%MYCMD
)PROC
&RESPONSE = .RESP
)END
and Rexx code is
/* REXX */
ADDRESS ISPEXEC "SELECT NEWAPPL(ISR) PASSLIB"
ARG DATASET
ADDRESS ISPEXEC
"LIBDEF ISPPLIB ID('R0287.C30FF.REXX.PANEL') DATASET STACK"
DATASET = STRIP(DATASET)
DATASET = STRIP(DATASET,,"'")
/* IF DATASET NOT PASSED, TRY GETTING IT FROM ISPF EDITOR */
IF DATASET = '' THEN
DATASET = DATASET_FROM_EDITOR()
DATASET = VERIFY_DATASET(DATASET)
DO FOREVER
CALL DISPLAY_XPORT_PANEL
END
EXIT 0
/**********************************************************************/
DATASET_FROM_EDITOR: PROCEDURE
ADDRESS ISREDIT "MACRO NOPROCESS"
ADDRESS ISREDIT "(DATASET) = DATASET"
ADDRESS ISREDIT "(MEMBER) = MEMBER"
IF DATASET ¬= 'DATASET' THEN
DO
IF MEMBER ¬= '' THEN
DATASET = DATASET || "(" || MEMBER || ")"
END
ELSE
DO
DATASET = ''
END
RETURN DATASET
/**********************************************************************/
VERIFY_DATASET: PROCEDURE
ARG DATASET
RESPONSE = 'ENTER'
DO FOREVER
IF RESPONSE ¬= "END" THEN
DO
DATASET = STRIP(DATASET)
SELECT
WHEN DATASET = '' THEN
DO
ZEDLMSG = 'Please Enter The Dataset Name To Xport'
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
END
WHEN POS('(',DATASET) > 0 THEN
DO
IF SYSDSN("'"DATASET"'") = 'OK' THEN
LEAVE
ELSE
DO
ZEDLMSG = 'Dataset Entered Is Not Valid'
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
END
END
OTHERWISE
DO
IF SYSDSN("'"DATASET"'") = 'OK' THEN
DO
CALL LISTDSI("'"DATASET"'")
IF SYSDSORG = 'PO' THEN
DO
ZEDLMSG = 'Enter Member Name'
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
END
ELSE
LEAVE
END
ELSE
DO
ZEDLMSG = 'Dataset Entered Is Not Valid'
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
END
END
END
END
ELSE
CALL EXIT_PROCESSING
CALL DISPLAY_GETDATAS
END
RETURN DATASET
/**********************************************************************/
DISPLAY_GETDATAS:
ADDRESS ISPEXEC "ADDPOP ROW(02) COLUMN(08)"
ADDRESS ISPEXEC "DISPLAY PANEL(GETDATAS)"
ADDRESS ISPEXEC "REMPOP"
RETURN
/**********************************************************************/
EXIT_PROCESSING:
IF FLAG = 'S' THEN
ZEDLMSG = 'Thanks For Using Xport !'
ELSE
ZEDLMSG = 'Xport Cancelled'
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
EXIT 0
/**********************************************************************/
DISPLAY_XPORT_PANEL:
ADDRESS ISPEXEC "VGET (XPORTPTH) PROFILE"
IF XPORTPTH = '' THEN
PATH = 'C:'
ELSE
PATH = XPORTPTH
PATH = PATH"\"CREATE_FILE_NAME()
CALL POPULATE_DEFAULT_VALUES
ADDRESS ISPEXEC "DISPLAY PANEL(XPORTPAN)"
SELECT
WHEN RESPONSE = "ENTER" THEN
DO
CMD = STRIP(MYCMD)
IF CMD ¬= '' THEN
DO
IF SUBSTR(CMD,1,5) = "PATH:" THEN
CALL MODIFY_PATH
ELSE
DO
ADDRESS TSO CMD
IF SUBSTR(CMD,1,8) = "IND$FILE" THEN
DO
FLAG = 'S'
END
END
MYCMD = ''
END
END
WHEN RESPONSE = "END" THEN
CALL EXIT_PROCESSING
OTHERWISE
SAY "OPPS"
END
RETURN
/**********************************************************************/
POPULATE_DEFAULT_VALUES:
DATASET = STRIP(DATASET)
DATASET = CENTER(DATASET,54)
PATH = STRIP(PATH)
IF LENGTH(PATH) < 77 THEN
DO
PATH1 = CENTER(PATH,76)
PATH2 = COPIES(' ',76)
PATH3 = COPIES(' ',76)
END
ELSE
DO
PATH1 = SUBSTR(PATH,1,76)
PATH2 = SUBSTR(PATH,77,76)
PATH3 = SUBSTR(PATH,153,76)
END
ZDATA01 = "
EssssssssssssssssssN
"
ZSHAD01 = "
AAAA////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
"
ZDATA02 = "
EsssO Xport To PC Tool FsssssssssssssssssssssssssssssssssssssssssssssssssssssssN
"
ZSHAD02 = "
/////RRRRRRRRRRRRRRRRRR/////////////////////////////////////////////////////////
"
ZDATA03 = "
e DssssssssssssssssssM e
"
ZSHAD03 = "
/AAA////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA04 = "
e e
"
ZSHAD04 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA05 = "
e DATASET TO EXPORT e
"
ZSHAD05 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAATTTTTTTTTTTTTTTTTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA06 = "
e e
"
ZSHAD06 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA07 = "e "DATASET" e"
ZSHAD07 = "
/WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW/
"
ZDATA08 = "
e e
"
ZSHAD08 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA09 = "
e DESTINATION PATH e
"
ZSHAD09 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATTTTTTTTTTTTTTTTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA10 = "
e e
"
ZSHAD10 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA11 = "e "PATH1" e"
ZSHAD11 = "
/WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW/
"
ZDATA12 = "e "PATH2" e"
ZSHAD12 = "
/WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW/
"
ZDATA13 = "e "PATH3" e"
ZSHAD13 = "
/WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW/
"
ZDATA14 = "
e e
"
ZSHAD14 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
/****/
ZDATA15 = "
e EsssssssssssN EssssssssssssN EssssssssssN e
"
ZSHAD15 = "
/AAAAAAAAAAAAAAA/////////////AAAA//////////////AAAA////////////AAAAAAAAAAAAAAAA/
"
ZDATA16 = "
DsssssssssssssssO XportFile FssssO ChangePath FssssO NoThanks FssssssssssssssssM
"
ZSHAD16 = "
/////////////////AAAAAAAAAAA//////AAAAAAAAAAAA//////AAAAAAAAAA//////////////////
"
ZDATA17 = "
DsssssssssssM DssssssssssssM DssssssssssM
"
ZSHAD17 = "
AAAAAAAAAAAAAAAA/////////////AAAA//////////////AAAA////////////AAAAAAAAAAAAAAAAA
"
RETURN
/**********************************************************************/
MODIFY_PATH:
PATH = SUBSTR(CMD,6)
XPORTPTH = PATH
ADDRESS ISPEXEC "VPUT (XPORTPTH) PROFILE"
RETURN
/**********************************************************************/
CREATE_FILE_NAME:
MYDATE = STRIP(DATE('S'))
MTIME = STRIP(TIME())
MYTIME = SUBSTR(MTIME,1,2) || SUBSTR(MTIME,4,2) || SUBSTR(MTIME,7,2)
IF POS('(',DATASET) > 0 THEN
DO
PARSE VAR DATASET DUMMY "(" FILE_NAME ")"
END
ELSE
DO
DATASET = STRIP(DATASET)
FILE_NAME = SUBSTR(DATASET,(LASTPOS('.',DATASET) + 1))
END
FILE_NAME = FILE_NAME"_"MYDATE"_"MYTIME".txt"
RETURN FILE_NAME
/**********************************************************************/
ADDRESS ISPEXEC "SELECT NEWAPPL(ISR) PASSLIB"
ARG DATASET
ADDRESS ISPEXEC
"LIBDEF ISPPLIB ID('R0287.C30FF.REXX.PANEL') DATASET STACK"
DATASET = STRIP(DATASET)
DATASET = STRIP(DATASET,,"'")
/* IF DATASET NOT PASSED, TRY GETTING IT FROM ISPF EDITOR */
IF DATASET = '' THEN
DATASET = DATASET_FROM_EDITOR()
DATASET = VERIFY_DATASET(DATASET)
DO FOREVER
CALL DISPLAY_XPORT_PANEL
END
EXIT 0
/**********************************************************************/
DATASET_FROM_EDITOR: PROCEDURE
ADDRESS ISREDIT "MACRO NOPROCESS"
ADDRESS ISREDIT "(DATASET) = DATASET"
ADDRESS ISREDIT "(MEMBER) = MEMBER"
IF DATASET ¬= 'DATASET' THEN
DO
IF MEMBER ¬= '' THEN
DATASET = DATASET || "(" || MEMBER || ")"
END
ELSE
DO
DATASET = ''
END
RETURN DATASET
/**********************************************************************/
VERIFY_DATASET: PROCEDURE
ARG DATASET
RESPONSE = 'ENTER'
DO FOREVER
IF RESPONSE ¬= "END" THEN
DO
DATASET = STRIP(DATASET)
SELECT
WHEN DATASET = '' THEN
DO
ZEDLMSG = 'Please Enter The Dataset Name To Xport'
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
END
WHEN POS('(',DATASET) > 0 THEN
DO
IF SYSDSN("'"DATASET"'") = 'OK' THEN
LEAVE
ELSE
DO
ZEDLMSG = 'Dataset Entered Is Not Valid'
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
END
END
OTHERWISE
DO
IF SYSDSN("'"DATASET"'") = 'OK' THEN
DO
CALL LISTDSI("'"DATASET"'")
IF SYSDSORG = 'PO' THEN
DO
ZEDLMSG = 'Enter Member Name'
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
END
ELSE
LEAVE
END
ELSE
DO
ZEDLMSG = 'Dataset Entered Is Not Valid'
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
END
END
END
END
ELSE
CALL EXIT_PROCESSING
CALL DISPLAY_GETDATAS
END
RETURN DATASET
/**********************************************************************/
DISPLAY_GETDATAS:
ADDRESS ISPEXEC "ADDPOP ROW(02) COLUMN(08)"
ADDRESS ISPEXEC "DISPLAY PANEL(GETDATAS)"
ADDRESS ISPEXEC "REMPOP"
RETURN
/**********************************************************************/
EXIT_PROCESSING:
IF FLAG = 'S' THEN
ZEDLMSG = 'Thanks For Using Xport !'
ELSE
ZEDLMSG = 'Xport Cancelled'
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
EXIT 0
/**********************************************************************/
DISPLAY_XPORT_PANEL:
ADDRESS ISPEXEC "VGET (XPORTPTH) PROFILE"
IF XPORTPTH = '' THEN
PATH = 'C:'
ELSE
PATH = XPORTPTH
PATH = PATH"\"CREATE_FILE_NAME()
CALL POPULATE_DEFAULT_VALUES
ADDRESS ISPEXEC "DISPLAY PANEL(XPORTPAN)"
SELECT
WHEN RESPONSE = "ENTER" THEN
DO
CMD = STRIP(MYCMD)
IF CMD ¬= '' THEN
DO
IF SUBSTR(CMD,1,5) = "PATH:" THEN
CALL MODIFY_PATH
ELSE
DO
ADDRESS TSO CMD
IF SUBSTR(CMD,1,8) = "IND$FILE" THEN
DO
FLAG = 'S'
END
END
MYCMD = ''
END
END
WHEN RESPONSE = "END" THEN
CALL EXIT_PROCESSING
OTHERWISE
SAY "OPPS"
END
RETURN
/**********************************************************************/
POPULATE_DEFAULT_VALUES:
DATASET = STRIP(DATASET)
DATASET = CENTER(DATASET,54)
PATH = STRIP(PATH)
IF LENGTH(PATH) < 77 THEN
DO
PATH1 = CENTER(PATH,76)
PATH2 = COPIES(' ',76)
PATH3 = COPIES(' ',76)
END
ELSE
DO
PATH1 = SUBSTR(PATH,1,76)
PATH2 = SUBSTR(PATH,77,76)
PATH3 = SUBSTR(PATH,153,76)
END
ZDATA01 = "
EssssssssssssssssssN
"
ZSHAD01 = "
AAAA////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
"
ZDATA02 = "
EsssO Xport To PC Tool FsssssssssssssssssssssssssssssssssssssssssssssssssssssssN
"
ZSHAD02 = "
/////RRRRRRRRRRRRRRRRRR/////////////////////////////////////////////////////////
"
ZDATA03 = "
e DssssssssssssssssssM e
"
ZSHAD03 = "
/AAA////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA04 = "
e e
"
ZSHAD04 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA05 = "
e DATASET TO EXPORT e
"
ZSHAD05 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAATTTTTTTTTTTTTTTTTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA06 = "
e e
"
ZSHAD06 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA07 = "e "DATASET" e"
ZSHAD07 = "
/WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW/
"
ZDATA08 = "
e e
"
ZSHAD08 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA09 = "
e DESTINATION PATH e
"
ZSHAD09 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATTTTTTTTTTTTTTTTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA10 = "
e e
"
ZSHAD10 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
ZDATA11 = "e "PATH1" e"
ZSHAD11 = "
/WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW/
"
ZDATA12 = "e "PATH2" e"
ZSHAD12 = "
/WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW/
"
ZDATA13 = "e "PATH3" e"
ZSHAD13 = "
/WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW/
"
ZDATA14 = "
e e
"
ZSHAD14 = "
/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
"
/****/
ZDATA15 = "
e EsssssssssssN EssssssssssssN EssssssssssN e
"
ZSHAD15 = "
/AAAAAAAAAAAAAAA/////////////AAAA//////////////AAAA////////////AAAAAAAAAAAAAAAA/
"
ZDATA16 = "
DsssssssssssssssO XportFile FssssO ChangePath FssssO NoThanks FssssssssssssssssM
"
ZSHAD16 = "
/////////////////AAAAAAAAAAA//////AAAAAAAAAAAA//////AAAAAAAAAA//////////////////
"
ZDATA17 = "
DsssssssssssM DssssssssssssM DssssssssssM
"
ZSHAD17 = "
AAAAAAAAAAAAAAAA/////////////AAAA//////////////AAAA////////////AAAAAAAAAAAAAAAAA
"
RETURN
/**********************************************************************/
MODIFY_PATH:
PATH = SUBSTR(CMD,6)
XPORTPTH = PATH
ADDRESS ISPEXEC "VPUT (XPORTPTH) PROFILE"
RETURN
/**********************************************************************/
CREATE_FILE_NAME:
MYDATE = STRIP(DATE('S'))
MTIME = STRIP(TIME())
MYTIME = SUBSTR(MTIME,1,2) || SUBSTR(MTIME,4,2) || SUBSTR(MTIME,7,2)
IF POS('(',DATASET) > 0 THEN
DO
PARSE VAR DATASET DUMMY "(" FILE_NAME ")"
END
ELSE
DO
DATASET = STRIP(DATASET)
FILE_NAME = SUBSTR(DATASET,(LASTPOS('.',DATASET) + 1))
END
FILE_NAME = FILE_NAME"_"MYDATE"_"MYTIME".txt"
RETURN FILE_NAME
/**********************************************************************/