IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DSUTILTY - Pseudo code look like Assembly but not!!!!


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Manu Dhawan

New User


Joined: 01 Jun 2009
Posts: 9
Location: India

PostPosted: Tue Jun 02, 2009 3:53 pm
Reply with quote

Hi,

I need help to understand the Pseudo code written in the control card of DSUTILTY. I found the similar type of code in WAAPDSUT as well. The step executing this is : -

Code:
//SELECT  EXEC PGM=DSUTILTY,PARM=ABEND                    *********   
//*                                                          *********
//SYSUT1   DD  DSN=input.file,DISP=SHR             
//SYSUT1A  DD  DSN=input.select,DISP=(OLD)                 
//SYSUT2   DD  DSN=output.file,DISP=(,CATLG,CATLG),         
//             UNIT=SYSDA,SPACE=(TRK,(30,90),RLSE)                   
//SYSUT3   DD  DSN=output.err,DISP=(,CATLG,CATLG),       
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=0) **BLKUP             
//SYSIN    DD  DSN=control.card(logic),DISP=SHR       
//SYSPRINT DD  SYSOUT=0                                               
//*                                                          *********


The logic in control card of SYSIN DD is :-

Code:
         CLC   COUNT1,=X'00000001'                                     
         BE    SYSUT2(RX)            GET DATE REC                       
         CLC   12(8,RX),=C'99999999' GET CONTROL REC                   
         BE    SYSUT2(RX)                                               
         CLC   10(10,RX),0(RY)       MATCH TO INPUT SELECT CARD(S)     
         BE    1                                                       
         BH    2                     GO CHECK IF ANY HITS ON THIS SEL   
         BL    DELETE(RX)            GET NEXT STAT RECORD               
1        BAL   SYSUT2(RX)            WRITE STAT FILE MATCH SELECT CARD 
         MVI   20(RY),C'X'           INDICATE A STAT REC WAS FOUND     
         B     DELETE(RX)              DELETE GO PROCESS NEXT STAT     
2        CLI   20(RY),C'X'           THIS WILL INDICATE A SELECT MADE   
         BE    DELETE(RY)            Y- DELETE AND GO TO THE NEXT I/P   
         MVC   20(41,RY),=C'**E R R O R** NO HIT ON STAT FILE THIS NO' 
         B     SYSUT3(RY)                                               
EOFX     MVC   0(1,RZ),=X'FF'                                           
80       CLC   1(1,RZ),=X'FF'                                           
         BE    EOF                                                     
         CLI   20(RY),C'X'        STAT RECORD FOUND                   
         BNE   81                 NO - GO BUILD ERROR MESSAGE         
         BAL   DELETE(RY)         DROP                               
         B     80                                                     
81       MVC   20(41,RY),=C'**E R R O R** NO HIT ON STAT FILE THIS NO'
         BAL   SYSUT3(RY)                                             
         BAL   DELETE(RY)                                             
         B     80                                                     
EOFY     MVC   1(1,RZ),=X'FF'                                         
90       CLC   0(1,RZ),=X'FF'                                         
         BE    EOF                                                   
         CLC   12(8,RX),=C'99999999' GET CONTROL REC                 
         BE    SYSUT2(RX)                                             
         BAL   DELETE(RX)                                             
         B     90                                                     
         END                                                         



After a test run I found what was done but I need to know exactly how control is flowing through the Pseudo code.

The test result shows following logic:-

input.file has n number of records and input.select has records 10bytes each. The input.select records are those which need to be extracted from the input.file.
The DSUTILTY use the control card to search input.file record by record and if first 10bytes of any record matches with the input.select it writes that record to output.file, and if not found a message get written to output.err file that specific record not found. Except that, two more records got written to output.file; one is date record(at the top of the input.file) and the other one is control record (with 99999... the last record of input.file)

I will be thankful if someone can help me to try run the pseudo code reaching the test result. I need to transform this code to any other to achieve the same thing.

Thanks,
Manu Dhawan
Back to top
View user's profile Send private message
Manu Dhawan

New User


Joined: 01 Jun 2009
Posts: 9
Location: India

PostPosted: Wed Jun 03, 2009 6:50 pm
Reply with quote

Any documentation over WAAPDSUT or DSUTILTY will be helpful too. I checked in our store but strangly couldn't find anything useful. Awaiting help.

Thanks,
Manu
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jun 03, 2009 7:07 pm
Reply with quote

do not hold too many hopes,
the question is too much site specific to expect an answer,

the consequences of using undocumented tools and interfaces should have been clear
to Your organization from the beginning

the best thing to do is to look at the application flow to understand what is going on
and rewrite the logic using sort ( dfsort or syncsort ) tools, very good at file matching
or a cobol program

Quote:
Awaiting help.

be careful not to get a S522 abend ( wait time limit exceeded )
Back to top
View user's profile Send private message
Manu Dhawan

New User


Joined: 01 Jun 2009
Posts: 9
Location: India

PostPosted: Thu Jun 04, 2009 12:20 pm
Reply with quote

Quote:

be careful not to get a S522 abend ( wait time limit exceeded )


HA HA...lol

Recently got the documentation on WAAPDSUT/DSUTILTY.

Will be converting the logic to DLY280.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 04, 2009 3:16 pm
Reply with quote

Hi,

May be searching under ISRDDN about this utility can give you some documentation in comments -- but beware, comments may lie.

Quote:
be careful not to get a S522 abend
She seems to be lucky, didn't get S222... icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Monitoring production job progress. N... JCL & VSAM 4
Search our Forums:

Back to Top