File transfer tool



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

File transfer tool

Postby keerthi286 » Thu Nov 15, 2012 4:20 pm

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

keerthi286
 
Posts: 6
Joined: Thu Nov 08, 2012 4:06 pm
Has thanked: 0 time
Been thanked: 0 time

Re: File transfer tool

 

Re: File transfer tool

Postby BillyBoyo » Thu Nov 15, 2012 4:48 pm

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?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: File transfer tool

Postby enrico-sorichetti » Thu Nov 15, 2012 5:02 pm

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 ****************************
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: File transfer tool

Postby NicC » Thu Nov 15, 2012 6:51 pm

As your error is an ISPF panel definition error I have moved this to TSO & ISPF
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: File transfer tool

Postby keerthi286 » Thu Nov 15, 2012 7:12 pm

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..
keerthi286
 
Posts: 6
Joined: Thu Nov 08, 2012 4:06 pm
Has thanked: 0 time
Been thanked: 0 time

Re: File transfer tool

Postby enrico-sorichetti » Thu Nov 15, 2012 7:20 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: File transfer tool

Postby Pedro » Thu Nov 15, 2012 7:21 pm

Use LOOKAT to find the message description for message ISPP277

http://www-03.ibm.com/systems/z/os/zos/bkserv/lookat/
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: File transfer tool

Postby Robert Sample » Thu Nov 15, 2012 7:24 pm

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).
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: File transfer tool

Postby Pedro » Fri Nov 16, 2012 1:48 am

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.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: File transfer tool

Postby keerthi286 » Fri Nov 16, 2012 12:53 pm

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
keerthi286
 
Posts: 6
Joined: Thu Nov 08, 2012 4:06 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post