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

pseudo code for a CLIST


IBM Mainframe Forums -> CLIST & REXX
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
mavesum

New User


Joined: 17 Nov 2008
Posts: 4
Location: United states

PostPosted: Fri Dec 12, 2008 4:50 pm
Reply with quote

Hi All,

CLIST is new to me . I have a simple CLIST which according to its developer "TEST A GDG GENERATION FOR EXISTANCE"

This is the CLIST . I am not able to understand the synatx , could anyone please explain me this in pseudo code.

Code:
SET &A = &STR(PRODGA.GL.DTL&GLCOY)
CONTROL MSG LIST
SET &SYSOUTTRAP = 102
LISTCAT LVL('&A')
IF &LASTCC < 4 THEN +
    IF &SYSOUTLINE < 100 THEN DO
        SET &B = &GDGMAX * 2 + 2
        IF &B > &SYSOUTLINE THEN +
            SET &LASTCC = 4
        END
    ELSE
ELSE +
    SET &LASTCC = 4
END


"Code"d for readability
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Dec 12, 2008 8:32 pm
Reply with quote

I don't know CLIST very well either, but I don't understand what it's trying to do either. It might help if you would post a runtime output of the CLIST with all diagnostic traces active.

I get an error because the variables &GLCOY and &GDGMAX have no values.

You usually use the IDCAMS LISTCAT command with the LVL parameter when you want to list all of the generations that belong to the given base entry. You usually use the IDCAMS LISTCAT command with the ENT parameter for a single generation.
Back to top
View user's profile Send private message
mavesum

New User


Joined: 17 Nov 2008
Posts: 4
Location: United states

PostPosted: Fri Dec 12, 2008 9:53 pm
Reply with quote

Thnx Kevin for writing ...I just have this CLIST .Actually i need to rewrite this CLIST in some other language for which I must understand what exactly it does .

I can provide you the JCL which is calling this CLIST

//XXXXXB JOB (ACCT0000000),'GAD826J',PRTY=2,
)SEL &OFFPEAK=Y
// CLASS=O
)ENDSEL
)SEL &OFFPEAK^=Y
// CLASS=4
)ENDSEL
//*
//JESA OUTPUT CLASS=A
//JESU OUTPUT CLASS=U
//JESDS1 OUTPUT CLASS=U,JESDS=ALL
//*
//* SKELETON JCL FOR THE NATURAL ON-LINE GASS PROGRAM
//* GAD826P6. TWO NATURAL PROGRAMS, GAD826P7 AND GAD826P8,
//* ARE SUBMITTED FROM THIS JCL.
//*
//STEP01 EXEC PGM=IKJEFT01
//SYSPROC DD DSN=SYS2.AGL.CLIST,DISP=SHR
//SYSTSPRT DD SYSOUT=(,),OUTPUT=*.JESU
//SYSTSIN DD *
%AGLGAD01 &GDGMAX &GLCOY
/*
Back to top
View user's profile Send private message
mavesum

New User


Joined: 17 Nov 2008
Posts: 4
Location: United states

PostPosted: Fri Dec 12, 2008 9:54 pm
Reply with quote

AGLGAD01 is the CLIST
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Dec 12, 2008 10:14 pm
Reply with quote

SET is for assigning a value to a variable.

Surely you can figure out the IF / THEN and ELSE statements.
Likewise, you should be able to match up the DO and END statements.

Search the CLIST manual for SYSOUTTRAP.

What is left that you do not understand?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


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 CLIST - Virtual storage allocation error CLIST & REXX 5
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
Search our Forums:

Back to Top