Page Up and Page Down



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

Re: Page Up and Page Down

Postby praveen_4 » Thu Nov 24, 2011 5:53 pm

Hi Robert,
I understand that every site has its own coding standards but end of the day logic remains the same.

I have a fare idea about the paging concepts but coding logic remains a bit of mystery for me....Please let me know if you could help me in any means...

Thanks & Regards
Praveen
praveen_4
 
Posts: 8
Joined: Thu Nov 24, 2011 3:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Page Up and Page Down

Postby NicC » Thu Nov 24, 2011 5:57 pm

And you should not tag your new question onto someone else's old post.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Page Up and Page Down

Postby enrico-sorichetti » Thu Nov 24, 2011 6:01 pm

as I said somewhere else ...
it is easier to teach a puppy not to s*it on the rug
than teach somebody how to post properly ;)
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: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Page Up and Page Down

Postby Robert Sample » Thu Nov 24, 2011 6:08 pm

One of the issues is what kind of file are you reading -- VSAM KSDS? VSAM ESDS? VSAM RRDS? Something else? IF the file is VSAM KSDS, and the key is the account number, one way would be to store the first and last account numbers you are displaying in the map -- place them in DFHCOMMAREA so they are retained across transactions. If someone hits the PF8 key, then you take the last account number and start browsing the file from that key. You may make it the first line of the new map, or you may just read the next record and use it for the first line. If someone hits the PF7 key, then you take the first account number and start browsing from that key, then use READPREV to backfill the map lines.

Another way would be to build a TS queue and store the item number for the map lines in DFHCOMMAREA. There are other ways, of course.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Page Up and Page Down

Postby praveen_4 » Thu Nov 24, 2011 6:24 pm

Enrico,
I believe no one starts walkin as soon as they are born..we gradually tend to learn things.
Yeah it would be much better if you go ahead and teach your puppy if that gives you comfort.

Anywaz thanks for talking time out and replyin.

Regards
Praveen
praveen_4
 
Posts: 8
Joined: Thu Nov 24, 2011 3:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Page Up and Page Down

Postby enrico-sorichetti » Thu Nov 24, 2011 6:38 pm

I believe no one starts walkin as soon as they are born..we gradually tend to learn things.
Yeah it would be much better if you go ahead and teach your puppy if that gives you comfort.


if You had looked around and read the FAQ here
faq.php
You would have noticed the paragraph
NewTopic & Topic Title
Start a new topic to post your queries.Do not ask your doubts as a reply to another post. Posts are to be made in relevant category/Forum. Make your topic title meaningful and descriptive. Do not use words such as Urgent/ Please/ Help! or Important in your subject line. Never use the Forum name as your topic title.

very little to learn ... uhu ?
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: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Page Up and Page Down

Postby praveen_4 » Thu Nov 24, 2011 6:53 pm

Hi Robert,
I am using Vsam name file where am taking the corporation number and account number as a key,displaying the account number greater then key and address: 5 records per screen.Would try the program with the above concept and keep you posted about my progress.

Appreciate you for taking time out and answering my query.

Regards
Praveen
praveen_4
 
Posts: 8
Joined: Thu Nov 24, 2011 3:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Page Up and Page Down

Postby praveen_4 » Fri Dec 09, 2011 12:14 pm

Hi Robert,
With the concept given was successfull in getting page up and page down but there is a small bug which am tryin to fix.
The page up doesnt seem to end with the given corp number but it reads the file with other corp and starts dispalying.

Have tried the following code but it didnt work.could you please guide me in this....Thank you.
5000-PAGE-UP       SECTION.
 
     IF  WS-NA-CORP-NO-0  NOT = NA-CORP-NO-0
         M2EX2-CORP     = SPACES OR LOW-VALUES
          MOVE     -1                      TO    M2EX2-TRANID-L
          MOVE     WS-NO-PAGE              TO    M2EX2-MSG
         PERFORM  2000-SEND-MAP
         GO TO    5000-99-EXIT
     ELSE
         MOVE     WS-NA-CORP-NO-0         TO    NA-CORP-NO-0
         MOVE     WS-NA-ACCOUNT-NO-FIRST  TO    NA-ACCOUNT-NO-0
         MOVE     18                      TO    WS-LENGTH
     END-IF.
     PERFORM    0500-STARTBR-PARA
     PERFORM    1500-READ-PREV-PARA
       MOVE   5 TO WS-I
     PERFORM UNTIL   WS-I <    1
            PERFORM    1500-READ-PREV-PARA
     IF WS-I = 1
           MOVE NA-CORP-NO-0     TO WS-NA-CORP-NO-0
           MOVE NA-ACCOUNT-NO-0  TO WS-NA-ACCOUNT-NO-LAST
     ELSE
           MOVE NA-CORP-NO-0     TO WS-NA-CORP-NO-0
           MOVE NA-ACCOUNT-NO-0  TO WS-NA-ACCOUNT-NO-FIRST
     END-IF
     PERFORM 1600-MOVE-TO-MAPVARIABLES
     SUBTRACT 1 FROM WS-I
     END-PERFORM
         MOVE  5    TO WS-I
     END-IF.
     PERFORM       2000-SEND-MAP.
5000-99-EXIT.
    EXIT.
praveen_4
 
Posts: 8
Joined: Thu Nov 24, 2011 3:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Page Up and Page Down

Postby dick scherrer » Fri Dec 09, 2011 1:11 pm

Hello,

You need to use the "code" tag for alignment and readability.

You should never post "it didn't work" (which is the biggest waste of time and space on the forum). You need to post what happened and ahow what you wanted to happen instead. Why should someone who would help be required to wade thru code and not know what problem(s) you have?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Page Up and Page Down

Postby praveen_4 » Fri Dec 09, 2011 1:45 pm

Hi
You need to post what happened and ahow what you wanted to happen instead.....?
Hmmm thats what have been posted in my query above..
A Detailed explanation would be.In my map given in previous query I am reading a file with corp as key and displaying the records of that particular corp which I was able to do.
The problem here is I was trying to limit my records to only records pertaining to certain corp.And if some other corp cumes then it should stop.
Please let me know if you can help me in this.

Regards
Praveen
praveen_4
 
Posts: 8
Joined: Thu Nov 24, 2011 3:44 pm
Has thanked: 0 time
Been thanked: 0 time

Previous

Return to CICS