Page 1 of 2

File transfer tool

PostPosted: Thu Nov 15, 2012 4:20 pm
by keerthi286
hi,

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



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
/**********************************************************************/


Re: File transfer tool

PostPosted: Thu Nov 15, 2012 4:48 pm
by BillyBoyo
Please learn how to use the Code tags to preserve formatting when you post.

Please also supply any information you feel may be usefule. Error messages, output produced etc.

With Rexx the first thing to do is to use Trace. Have you done that?

Re: File transfer tool

PostPosted: Thu Nov 15, 2012 5:02 pm
by enrico-sorichetti
first ...
what has the topic to do with assembler

second ...
to make easier for the people willing to help You to understand Your problem
it is good manners to post code using - the name tells - the code tags
inline text uses a variable pitch font, code' d text uses a fixed pitch font

here is how things look ( just a random snippet form my toolbox )
**********************************************************************************************
inline

EDIT ENRICO.ISPF.EXEC(SWAREQ) - 01.02 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000002 swareq: procedure
000003 If right(c2x(Arg(1)),1) /= 'F' Then
000004 return c2d(Arg(1))+16
000005 sva = c2d(Arg(1))
000006 tcb = ptr(540)
000007 jscb = ptr(tcb+180)
000008 qmpl = ptr(jscb+244)
000009 qmat = ptr(qmpl+24)
000010 do while (sva>65536)
000011 qmat = ptr(qmat+12)
000012 sva = sva - 65536
000013 end
000014 return ptr(qmat+sva+1)+16
****** **************************** Bottom of Data ****************************

code' d

EDIT       ENRICO.ISPF.EXEC(SWAREQ) - 01.02                Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 ****** ***************************** Top of Data ******************************
 000001 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000002 swareq: procedure
 000003     If right(c2x(Arg(1)),1) /= 'F' Then
 000004        return c2d(Arg(1))+16
 000005     sva = c2d(Arg(1))
 000006     tcb = ptr(540)
 000007     jscb = ptr(tcb+180)
 000008     qmpl = ptr(jscb+244)
 000009     qmat = ptr(qmpl+24)
 000010     do while (sva>65536)
 000011       qmat = ptr(qmat+12)
 000012       sva = sva - 65536
 000013     end
 000014     return ptr(qmat+sva+1)+16
 ****** **************************** Bottom of Data ****************************

Re: File transfer tool

PostPosted: Thu Nov 15, 2012 6:51 pm
by NicC
As your error is an ISPF panel definition error I have moved this to TSO & ISPF

Re: File transfer tool

PostPosted: Thu Nov 15, 2012 7:12 pm
by keerthi286
BillyBoyo wrote:Please learn how to use the Code tags to preserve formatting when you post.

Please also supply any information you feel may be usefule. Error messages, output produced etc.

With Rexx the first thing to do is to use Trace. Have you done that?



Hi Billy,

i am getting error

ISPP277

Panel 'XPORTPAN' error
First line of an area must identify the left and right boundaries.






Current dialog statement:
DISPLAY PANEL(XPORTPAN)

could you please tell me how to resolve this and i haven't use trace..

Re: File transfer tool

PostPosted: Thu Nov 15, 2012 7:20 pm
by enrico-sorichetti
Current dialog statement:
DISPLAY PANEL(XPORTPAN)

could you please tell me how to resolve this and i haven't use trace..


by reading the appropriate ISPF manuals about the REQUIRED CLAUSES in a PANEL definition

starting from
here
http://www-03.ibm.com/systems/z/os/zos/ ... index.html
and navigating to the proper bookshelf for Your zOS level

just for the problem described also an older level of the manuals might be enough
http://publibz.boulder.ibm.com/cgi-bin/ ... s/ISPZPM70

Re: File transfer tool

PostPosted: Thu Nov 15, 2012 7:21 pm
by Pedro
Use LOOKAT to find the message description for message ISPP277

http://www-03.ibm.com/systems/z/os/zos/bkserv/lookat/

Re: File transfer tool

PostPosted: Thu Nov 15, 2012 7:24 pm
by Robert Sample
It is not that hard to find the error message in the appropriate manua or via LOOKAT:
ISPP277
Panel 'aaaaaaaa' error - First line of an area must identify the left and right boundaries.
Explanation:

Scrollable, graphic, and dynamic areas require that the area's attribute (defined in the attribute section) must designate the right and left boundaries of the area's first line.
Programmer response:

Use the areas attribute character (defined in the attribute section) to designate the left and right boundaries of the area's first line.
So maybe you should use the attribute byte to define the left and right boundaries of the first line? The error message text you posted pretty clearly indicates the same thing -- which implies a lot about your understanding of written English (or your ability to comprehend what you are given in writing).

Re: File transfer tool

PostPosted: Fri Nov 16, 2012 1:48 am
by Pedro
BTW, it is not typical to use dynamic areas for the type of application that you are writing. You are making in harder than it should be. I think you should write the panel with fixed text and data entry fields. You use dynamic areas when the panel may show one thing the first time and something vastly different the next time.

Re: File transfer tool

PostPosted: Fri Nov 16, 2012 12:53 pm
by keerthi286
Hi enrico,
thanks for your reply and thanks for sharing the link.

enrico-sorichetti wrote:
Current dialog statement:
DISPLAY PANEL(XPORTPAN)

could you please tell me how to resolve this and i haven't use trace..


by reading the appropriate ISPF manuals about the REQUIRED CLAUSES in a PANEL definition

starting from
here
http://www-03.ibm.com/systems/z/os/zos/ ... index.html
and navigating to the proper bookshelf for Your zOS level

just for the problem described also an older level of the manuals might be enough
http://publibz.boulder.ibm.com/cgi-bin/ ... s/ISPZPM70