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

"WHATIF" TSO Command info


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Fri Nov 13, 2009 12:15 am
Reply with quote

Hi,

Is "WHATIF" a TSO command. I encountered the following code in REXX.

Code:
"whatif file(sysprint) allocated"     
if rc\=0 then                         
  "alloc fi(sysprint) da(*)"   


But I can't find any info on this anywhere. Google shows an entry from CBTtape that says in comment : Using WHATIF TSO command.

Nothing in TSO_E Command Reference or REXX manual.

Appreciate much for any information on this or direction to any manual.

Regards.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Nov 13, 2009 12:26 am
Reply with quote

speak to Your support for local extensions and related docs
/very good mode on
here the help text for the whatif ( extracted from file 300 of the cbt )
Code:
)F FUNCTION                                                            C00010001
   THE WHATIF COMMAND IS INTENDED FOR USE IN COMMAND PROCEDURES.        00020001
   IT ALLOWS THE CONDITIONAL EXECUTION OF A TSO COMMAND BASED ON        00030001
   ANY COMBINATION OF THE FOLLOWING CRITERIA:                           00040001
     1) Whether a file or dataset is allocated.                         00050001
     2) Whether a dataset is allocated to a specific file name.         00060001
     3) Whether a dataset is cataloged.                                 00070001
     4) Whether two strings bear a specified relation to each other.    00080001
                                                                        00090001
     Note that all the conditions specified on the command must be      00100001
     satisfied before the command in the 'then' keyword is executed.    00110001
                                                                        00120001
     IF THE 'THEN(COMMAND)' KEYWORD IS NOT SPECIFIED, THE RETURN CODE   00130001
     WILL BE SET TO INDICATE TRUE (0) OR FALSE (4).                     00140001
                                                                        00150002
     IF THE 'THEN(COMMAND)' KEYWORD IS SPECIFIED, THE RETURN CODE       00160002
     WILL BE SET by the executed command or, if the command is not      00170002
     executed, will be set to the value &lastcc had prior to whatif.    00180002
)X SYNTAX                                                               00190001
       WHATIF   FILE('DDNAME')  DATASET('DSNAME')                       00200001
         ALLOCATED/NALLOCATED   CATALOGED/NCATALOGED                    00210001
         PSTRING('STRING1')  EQ/NE/GT/LT/GE/LE/NG/NL  QSTRING('STRING2')00220001
         THEN('COMMAND')                                                00230001
                                                                       .00240001
   REQUIRED: ONE OF THE ABOVE TESTS                                     00250001
   Defaults: none                                                       00260001
)O OPERANDS                                                             00270001
))THEN('command') - 'command' is TSO command to be executed if all      00280001
       TESTS SPECIFIED ARE SATISFIED. NOTE - 'GOTO' IS NOT A VALID      00290001
       TSO COMMAND; IT IS AN MVS CLIST STATEMENT AND MAY NOT BE         00300001
       SPECIFIED HERE.  IF YOU OMIT THIS KEYWORD ENTIRELY, THE          00310001
       WHATIF COMMAND WILL SET A RETURN CODE THAT YOUR CLIST CAN        00320001
       TEST AS FOLLOWS: IF &LASTCC EQ 0 THEN GOTO TRUElabl              00330002
))FILE('ddname') - The ddname given as the argument of this keyword     00340001
       MAY BE TESTED TO SEE IF IT IS ALLOCATED OR IF IT IS ALLOCATED TO 00350001
       A SPECIFIC DATASET. (SEE ALLOCATED/NALLOCATED).                  00360001
))DATASET('dsname') - the 'dsname' specified may be:                    00370001
       1) TESTED TO SEE IF IT IS ALLOCATED.                             00380001
       2) USED IN CONJUNCTION WITH THE FILE KEYWORD TO SEE IF IT        00390001
          IS ALLOCATED TO THE SPECIFIED FILE NAME.                      00400001
       3) TESTED TO SEE IF IT IS CATALOGED.                             00410001
       SEE ALLOCATED/NALLOCATED AND CATALOGED/NCATALOGED FOR DETAILS.   00420001
       FULLY QUALIFIED DATA SET NAMES MUST BE IN QUOTES (').            00430001
       UNQUALIFIED DATA SET NAMES WILL BE PREFIXED IN THE NORMAL WAY.   00440001
))ALLOCATED - If this keyword is specified and:                         00450001
       1) THE FILE KEYWORD ONLY IS GIVEN: THE DDNAME SPECIFIED IS       00460001
          TESTED TO SEE IF IT IS ALLOCATED.                             00470001
       2) THE DATASET KEYWORD ONLY IS GIVEN: THE DSNAME SPECIFIED IS    00480001
          TESTED TO SEE IF IT IS ALLOCATED.                             00490001
       3) BOTH THE FILE AND DATASET KEYWORDS ARE GIVEN: THE DSNAME IS   00500001
          TESTED TO SEE IF IT IS ALLOCATED TO THE SPECIFIED DDNAME.     00510001
))NALLOCATED - This is the NOT form of the ALLOCATED keyword.           00520001
       SEE ALLOCATED FOR DETAILS OF THE TESTS PERFORMED.                00530001
))CATALOGED - If this keyword is specified dsname given as the argument 00540001
       OF THE DATASET KEYWORD IS TESTED TO SEE IF IT IS CATALOGED.      00550001
))NCATALOGED - This is the NOT form of the CATALOGED keyword.           00560001
       SEE CATALOGED FOR DETAILS OF THE TESTS PERFORMED.                00570001
))PSTRING('string1') - The first of a pair of quoted strings which are  00580001
       TO BE COMPARED ACCORDING TO A SPECIFIED RELATION.                00590001
))QSTRING('string2') - The second of a pair of quoted strings which are 00600001
       TO BE COMPARED ACCORDING TO A SPECIFIED RELATION.                00610001
))EQ - If this keyword is specified the arguments of PSTRING and        00620001
       QSTRING ARE TESTED FOR EQUALITY.                                 00630001
))NE - If specified indicates that PSTRING should be compared to        00640001
       QSTRING for inequality.                                          00650001
))GT - If specified indicates that PSTRING should be compared to        00660001
       QSTRING for greater than.                                        00670001
))NG - If specified indicates that PSTRING should be compared to        00680001
       QSTRING for not greater than.                                    00690001
))LT - If specified indicates that PSTRING should be compared to        00700001
       QSTRING for less than.                                           00710001
))NL - If specified indicates that PSTRING should be compared to        00720001
       QSTRING for not less than.                                       00730001
))GE - If specified indicates that PSTRING should be compared to        00740001
       QSTRING for greater than or equal to.                            00750001
))LE - If specified indicates that PSTRING should be compared to        00760001
       QSTRING for less than or equal to.                               00770001
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Sat Nov 14, 2009 12:25 am
Reply with quote

<> grateful mode on <>
Thank you!
<> grateful mode off <>
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
Search our Forums:

Back to Top