CICS ASM



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

CICS ASM

Postby markhenry11 » Tue Sep 17, 2024 5:32 pm

How can I make this below program to CICS ASM program and also abnd. suggest how can i rectify it.


MYPROG START     0
         YEBEQU
*
         SAVE      (14,12),,WORKAREA
         LR        R12,R15
         USING     *,R12
         STM       R14,R12,12(13)
         ST        R13,SAVEAREA+4
         LA        R13,SAVEAREA
         ST        R13,8(,R13)
*
         L         R1,0(R1)
         L         R2,0(R1)
         L         R3,80(R1)
*
         MVC       OUTPUT(80),=X'40'
*
         LA        R4,0
         LA        R5,0
         LA        R6,0
         LA        R3,80
         LA        R7,INPUT
*
*
FINDWORD CLI       0(R7),C' '
         BE        TESTLEN
         LA        R5,1(R5)
*
FINDCHAR LA        R7,1(R7)
         BCT       R3,FINDWORD
*
TESTLEN  LTR       R5,R5
         BNZ       WORDEND
*
ENDOFC   LTR       R3,R3
         BZ        PROCWORD
         B         FINDCHAR
*                                                                       00014200
WORDEND  CR        R5,R4                                                00014300
         BNH       FINDWORD
         LR        R4,R5
         LR        R6,R7
         SR        R6,R4
         BCTR      R6,0                                                 00014400
*                                                                       00014900
         XR        R5,R5
*                                                                       00015200
NEXTWORD LA        R8,OUTPUT                                            00015400
         ST        R4,BIGWORD
         ST        R6,STARTWORD
         BCTR      R4,0
         EX        R4,MOVELONGEST
         OI        0(R8),X'40'
         B         FINDWORD
*
PROCWORD DS        0H
         LA        R7,INPUT
         XR        R5,R5
         LA        R3,80
*
LOOP1    CLI       0(R7),C' '
         BE        ENDCHAR
         LA        R7,1(R7)
         LA        R5,1(R5)
         BCT       R3,LOOP1
*
ENDCHAR  LTR       R5,R5
         BNZ       REVERSE
         LTR       R3,R3
         BZ        FINISH
         B         LOOP1
*
REVERSE  LR        R8,R5
         SRL       R8,1
         LR        R6,R7
         SR        R6,R5
         BCTR      R7,0
         BCTR      R6,0
*
LOOPREV  MVC       TEMP,0(R7)
         MVC       0(1,R7),0(R6)
         MVC       0(1,R6),TEMP
         LA        R6,1(R6)
         AH        R7,=H'-1'
         BCT       R8,LOOPREV
         LTR       R3,R3
         BNP       FINISH
         LA        R7,1(R5,R7)
         XR        R5,R5
         B         LOOP1
*
MOVELONGEST   DS   0H
         MVC       0(0,R8),0(R6)
*
FINISH   DS        0H
         MVC       OUTPUT+80(80),=X'40'
         LA        R8,OUTPUT
         TRT       OUTPUT(80),TRTABLESPACE
*        EXEC CICS WRITEQ TS QUEUE(=C'MYPROG') FROM(0(R8))
*                     LENGTH(160)
*
         EXEC  CICS RETURN
*
         EJECT
*                                                                       00018900
*                                                                       00024420
TRTABLEUPPER    DC 256X'00'            TRANSLATION TABLE                00024430
           ORG     TRTABLEUPPER+C'A'                                    00024440
           DC      C'ABCDEFGHIJKLMNOPQRSTUVWXYZ'                        00024450
           ORG     TRTABLEUPPER+C'a'
           DC      C'abcdefghijklmnopqrstuvwxyz'
*                                                                       00024490
TRTABLESPACE    DC 256X'40'            TRANSLATION TABLE
           ORG     TRTABLESPACE+C'A'
           DC      C'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
           ORG     TRTABLESPACE+C'a'
           DC      C'abcdefghijklmnopqrstuvwxyz'
*
BIGWORD  DS        F
STARTWORD  DS      F
SAVEAREA DS        18F
INPUT    DS        CL80
OUTPUT   DS        CL80
WORKAREA DS        80C                                                  00024500
COMMAREA DS        CL180                                                00024600
WORK     DS        CL80                                                 00024610
TEMP     DS        CL1
         END       MYPROG                                             00024800
markhenry11
 
Posts: 2
Joined: Mon Sep 16, 2024 8:29 pm
Has thanked: 0 time
Been thanked: 0 time

Re: CICS ASM

Postby prino » Wed Sep 18, 2024 5:58 pm

And comments aren't required?

The going rate for assembler programmers is probably about $1,200 per day, so start saving!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: CICS ASM

Postby sergeyken » Wed Sep 18, 2024 11:48 pm

markhenry11 wrote:How can I make this below program to CICS ASM program and also abnd. suggest how can i rectify it.

You can try doing it in this way:
Sample Assembler program for CICS

P.S.
So far, your sample cannot work even without CICS.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 436
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: CICS ASM

Postby markhenry11 » Thu Sep 19, 2024 3:40 pm

sergeyken wrote:
markhenry11 wrote:How can I make this below program to CICS ASM program and also abnd. suggest how can i rectify it.

You can try doing it in this way:
Sample Assembler program for CICS

P.S.
So far, your sample cannot work even without CICS.




Any suggestions to modify pls
markhenry11
 
Posts: 2
Joined: Mon Sep 16, 2024 8:29 pm
Has thanked: 0 time
Been thanked: 0 time

Re: CICS ASM

Postby enrico-sorichetti » Thu Sep 19, 2024 5:03 pm

click on the link to see a Sample Assembler program for CICS

Sample Assembler program for CICS
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: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: CICS ASM

Postby sergeyken » Thu Sep 19, 2024 5:06 pm

markhenry11 wrote:Any suggestions to modify pls

Since one of initial lines in your sample is senseless (try to guess - why?):
        MVC       OUTPUT(80),=X'40'
It makes no sense to investigate it further.
It all looks like a primitive text parser, but doing nothing useful.

There is no comment at all in your code. Do you have any idea yourself: what this code is supposed to do?

Besides of all said above, this is not a DO-MY-JOB-FOR-ME forum, and not any sort of ONLINE-LEARNING-FROM-SCRATCH site, but this is the HELP FORUM.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 436
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times


Return to CICS

 


  • Related topics
    Replies
    Views
    Last post