Cobol Questions by Mcmillan
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Application Programming

#1: Cobol Questions by Mcmillan Author: mcmillan PostPosted: Fri Mar 21, 2003 4:56 pm
    —
1. Can I accept a COMP/COMP-3 Item in VS COBOL II Thru JCL or CICS?

2. When I delete a record in a VSAM ESDS/ KSDS & RSDS FILE Thru COBOL(without CICS) Iis it actually deleted?

3. Can I use VSAM-ESDS File for cobol sequnrial file access(instead of PS)? What are the FD entries for ESDS?

4. What is the output when displaying an item having low-value and also having high value?

5. How can I find exponential of a number in VS COBOL II? (does COMPUTE = A**2 work in VS COBOL II)?


Last edited by mcmillan on Tue Jun 03, 2003 12:53 pm; edited 1 time in total

#2:  Author: CaptBillLocation: Pasadena, California, USA PostPosted: Fri Mar 21, 2003 5:35 pm
    —
The answers given would depend on your level of experience. Little experience would dictate detailed answers, lots of experience dictates very brief answers.

Please indicate your experience level so we may taylor answers accordingly.

#3:  Author: kolusuLocation: San Jose PostPosted: Fri Mar 21, 2003 5:53 pm
    —
Mcmillan,

Answer1: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGYL1101/3.1.1?SHELF=&DT=19930312093006

Answer2: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGYA1101/4.3.5.8?SHELF=&DT=19930312141355

Answer3: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGYA1101/4.3.4?DT=19930312141355

Answer4: For high-value it will have a hex value of x'FFFFFF' and for low-value it will have a hex value of x'000000'

Answer5: COMPUTE C = A**2 works in VS COBOL II to calculate the exponention

Btw VS COBOL II is no longer supported by IBM and is withdrwan from service.

Check this link for history cobol compilers

http://www-1.ibm.com/servers/eserver/zseries/zos/le/history/cobmvs.html


Hope this helps...

cheers

kolusu

Ps: Please avoid typing everyting in CAPS. It sends out a message that you are yelling. I took the liberty of editing the post to remove all caps post.As captbill said please tell us your level of expertise

#4:  Author: mcmillan PostPosted: Sat Mar 22, 2003 8:20 pm
    —
DEAR SIR, I AM A MAINFRAME PROGRAMMER HAVING ONE YEAR EXPERIENCE.
I HAVE THE FOLLOWING DOUBTS FOR A LONG TIME. MY COMPANY DOESN\'T ALLOW TO CHECK THIS IN MY TERMINAL.
PLEASE CHECK THIS IN VS COBOL II AND ANSWER THE FOLLOWING - PLEASE!


Last edited by mcmillan on Tue Jun 03, 2003 1:44 pm; edited 1 time in total

#5:  Author: mcmillan PostPosted: Sat Mar 22, 2003 9:30 pm
    —
WHAT'S THE NEW PRODUCT COBOL?
VS COBOL II R4 is withdrawn from IBM. then how we code cobol programs. Using ibm cobol OR cobol/370.

WHICH IS LATEST 1.IBM COBOL or COBOL/370 or VS COBOL II.
WHAT ARE THE DIFFERENCES B/W THEM?

My doubt is through jcl sysin can i ACCEPT a comp/comp-3 data item. or can i initialize a comp/comp-3 data item through cobol VALUE clause.

if i delete a vsam file(cobol seq,rel or indexed) is it actually work or not?

please,please reply me sir.


Last edited by mcmillan on Tue Jun 03, 2003 1:47 pm; edited 1 time in total

#6:  Author: kolusuLocation: San Jose PostPosted: Sun Mar 23, 2003 7:56 am
    —
mcmillan,

Even though OS/VS COBOL & VS COBOL II are withdrawn from service many shops still have those compilers and still code programs even though it is not supported by IBM now. If you see the link I gave in the first post you will see that Enterprise COBOL is the latest version in cobol. As per the differences between the old and newer versions there are many and now the latest version of cobol is equipped to handle XML also and there are many intrinsic functions available which makes the life of the programmer easy.Check the link for the differences between the older and new version of cobol

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGYMG202/CCONTENTS?DT=20001004155832
Quote:

if i delete a vsam file(cobol seq,rel or indexed) is it actually work or not?


I dont quite understand the question.But if your question is the record physically deleted from the vsam files then the record is not physically deleted in ESDS, it is just flagged as delete and you cannot claim the deleted space. For RRDS and KSDS the record is deleted physically.

As for comp/comp-3 items accepted via sysin then put the comp/comp-3 value in a dataset and assign it to the sysin dd and you can read the file in the program.And you can initialize comp/comp-3 items

Hope this helps...

cheers

kolusu

PS: Please stop typing with your caps lock on.I already mentioned it once.

#7:  Author: sladeLocation: Edison, NJ USA PostPosted: Sun Mar 23, 2003 10:58 am
    —
Hi Mcmillan,

If you want to input comp-3/comp fields to your pgm from JCL, you can try one of the following:

1) Use a key (or combination of keys) that would produce the bit configuration you desire for the field. I'm not sure that you can construct key combinations to provide ALL 255 bit combinations possible in a byte of data. You can check an EBCDIC conversion chart.

For example, if you want to input a comp-3 positive 13, you have to enter 2 keyboard key combinations (or a single key) representing '01' and '3C' into the input line. To enter a binary value convert it from decimal and then input the binary value as described above.

2) The alternative, much easier, BTW, is to input the "display data type" version of the field and then "read" it into a "display" field and move it to its comp/comp-3 counterpart in the pgm code.

These alternatives apply to both SYSIN and PARM inputs.

Regards, Jack.

#8:  Author: mcmillan PostPosted: Fri Mar 28, 2003 8:50 am
    —
1. IS IT WORK IN VS COBOL II?

01 A PIC S9(5) COMP VALUE 25..
ACCEPT A. // Now can I give an INPUT for this through JCL\'s SYSIN statement

2. WHILE DELETING A VSAM/RELATIVE OR VSAM/IDEXED FILE\'s RECORD THROUGH VS COBOL II (using DELETE INVALID KEY IS THE RECORD ACTUALLY DELETED? (not through CICS)

3. CAN I MOVE A COMP/COMP-3 ITEM TO ANOTHER ITEM(such as USAGE DISPLAY) IN VS COBOL II?

4. WHAT IS THE OUTPUT?
01 A PIC X(6) VALUE LOW-VALUES.
01 B PIC X(6) VALUE HIGH-VALUES.
DISPLAY A.
please don\'t tell as X\'00000\' , I need the SDSF \'s SYSOUT cotents
DISPLAY B.

5. HOW MANY ALTERNATIVE INDEXES CAN I SPECIFIED FOR AN INDEXED FILE UNDER VS COBOL II?

6. HOW MANY INDEXED CAN I SPECIFIED FOR A TABLE IN VS CBOL II?

7. CAN I USE INSPECT VERB IN CICS+ VS COBOL II PROGRAM?

8. CAN YOU PLEASE GIVE ME AN REXX EXEC EXAMPLE THAT CONTAINS AN EMBEDDED JCL (TO RUN A COBOL PROGRAM)?

Thank you


Last edited by mcmillan on Tue Jun 03, 2003 1:00 pm; edited 1 time in total

#9:  Author: kolusuLocation: San Jose PostPosted: Fri Mar 28, 2003 11:06 am
    —
Mcmillan,

I have already mentioned twice to you not to post in caps, as it means you are yelling. I have edited your first post to be in small letters.And once again you still keep posting in caps.If you really keep up this up no one is going to answer your queries in future.

Quote:
1. Is it work in vs cobol ii?
01 a pic s9(5) comp value 25..
accept a. // now can i give an input for this through jcl's sysin statement

Answer: NO.The Item you are accepting can be any group item, or an elementary alphabetic, alphanumeric,alphanumeric-edited, numeric-edited or external decimal item.

Quote:

2. while deleting a vsam/relative or vsam/idexed file's record through vs cobol ii (using delete <rec> invalid key <---> verb>,is the record actually deleted? (not through cics)


Answer: Yes. The record is physically deleted from the KSDS/RRDS Clusters
Quote:

3. can i move a comp/comp-3 item to another item(such as usage display)
in vs cobol ii?


Answer: Yes.
Quote:

4. what is the output?
01 a pic x(6) value low-values.
01 b pic x(6) value high-values.
display a. //please don't tell as x'00000' , i need the sdsf 's sysout
cotents
display b.


Answer: If you are that specific about SDSF output then all you will see is spaces for both A and B.

Quote:

5. how many alternative indexes can i specified for an indexed file
under vs cobol ii?


Answer: 253
Quote:

6. how many indexed can i specified for a table in vs cbol ii?


ANswer: It depends on the dimension of the table.check this code. It has 3 indexes for a 3 dimension table.

Code:

01  TABLE-1.
         05  TABLE-ENTRY1 OCCURS 10 TIMES
                          INDEXED BY TE1-INDEX.
             10  TABLE-ENTRY2 OCCURS 10 TIMES
                              INDEXED BY TE2-INDEX.
                 15  TABLE-ENTRY3  OCCURS 5 TIMES
                       ASCENDING KEY IS KEY1
                       INDEXED BY TE3-INDEX.
                     20  KEY1                    PIC X(5).
                     20  KEY2                    PIC X(10).



Quote:

7. can i use inspect verb in cics+ vs cobol ii program?


Answer:Yes

Hope this helps...

cheers

kolusu

#10:  Author: mcmillan PostPosted: Sun Mar 30, 2003 7:19 am
    —
THANK YOU SO MUCH FOR YOPUR ANSWERS. I NEED THE FOLLOWING TOO.
PLEASE HELP ME SIR.

1. CAN YOU PLEASE GIVE ME A SAMPLE JCL TO COMPILE A OS/VS COBOL PROGRAM?

2. AND A SAMPLE COMPILE JCL FOR VS COBOL II PROGRAM?

3. AND A COMPILE JCL FOR COBOL/370 PROGRAM?

4. AND A COMPILE JCL FOR IBM COBOL FOR 0S/390 PROGRAM?

5. AND A COMPILE JCL FOR C/370 PROGRAM?


Last edited by mcmillan on Tue Jun 03, 2003 1:04 pm; edited 1 time in total

#11:  Author: kolusuLocation: San Jose PostPosted: Sun Mar 30, 2003 1:38 pm
    —
mcmillan,

Do you read the posts clearly ? I warned thrice not to post in CAPS and I also mentioned that no is one going to answer your queries if you keep doing that. Still you keep on doing that.

can't you post your queries in small letters? Evil or Very Mad ALso please avoid posting the same question in more than one forum.I deleted the same question posted in the JCL forum.

Until you change your attitude I am not going to answer any of your queries

Kolusu

#12:  Author: mcmillan PostPosted: Wed Apr 02, 2003 11:04 pm
    —
Oh I am very Sorry. As Always I am with my terminal, It;s become my habit. Please forgive me.

Sir,

Ok. Now I need the following helps. please Please help me sir.


1. Sir, This is a part of my VS Cobol II R1 Compile JCL.
Code:

 000002 //STEP1  EXEC IGYWCL,                                                   
 000003 //   PARM.COBOL=\'LIB,APOST,XREF,MAP,OFFSET'     

Can you please explain, What is LIB, MAP, OFFSET? What is the functions & need of them? Where Can I specify AMODE, SSRANGE, FLAG,RENT,RESIDENT etc compiler options? Can I specify with them (with LIB,APOST---) or with my actual compile procedure (IGYWCL)?

2. What is Language Environment? What's the use of it? Is it available with VS COBOL II Under s/390?

3. Sir, What is Spanned file(S like V,F,FB,VB & U)? Can I use this file with VS cobol II? What is the JCL equivalent Recording format for that? Can I specify RECORDING MODE clause in COBOL for VSAM files (my compiler ignores that)?

4. Can I use EXTEND Mode with VSAM/RRDS & KSDS Files Under SEQUENTIAL Access? Can I use SORT/MERGE With RELATIVE & INDEXED File under DYNAMIC Mode?

5. What is USAGE IS POINTER? Can I use PIC clause with this? Can I Move a value & Accept & Display the Pointer contents? (please give an example)

6. Can I pass a VALUE (literal) to subprogram while call by content? (Ex: CALL "PGM01" BY CONTENT 4, BY REFERENCE A.)

7. What is the mean for VS in VS COBOL II? (VISUAL or VIRTUAL)

8. What's COMP-4 & COMP-5 in VS COBOL II? How much storage occupied by each COMP-4/-5 Char? Is COMP-6 available in Mainframes?

9. Can I use COMP-1 & COMP-2 in my program? Can I initialize &amp; accept it from console (yes, without PIC)? Please give me an example?
Can I use Floating points like: 01 AA PIC 9(18 ) VALUE IS 0.656E+02 . If not, how can I use floating points?

10. Can I use the variable in my pgm, which is declare as EXTERNAL in any batch program(not nested) running under the same TSO?
Can I access the GLOBAL Data declared in main program in my sub program(not passed via linkage section)?

Waiting for your reply,
Thanks a lot in Advance Mcmillan


Last edited by mcmillan on Tue Jun 03, 2003 1:07 pm; edited 1 time in total

#13:  Author: kolusuLocation: San Jose PostPosted: Thu Apr 03, 2003 11:24 am
    —
Mcmillan,

I am glad that you finally paid attention to my posting. Posting in caps means you are shouting or yelling. That is the reason why I wanted you to post in Lower case.

oh Boy you have many questions. But I guess these are are all part of interview questions. can you clarify that?? I am answering the questions,but most of the questions can be easily answered by looking up the manual. If you are not aware this site hosts the manuals also. GO to www.mvsforums.com and you can find all the manuals

For you I would recommend you to go thru the following manuals

VS COBOL II Application Programming Guide

VS COBOL II Application Programming Language Reference

Quote:

1. Sir, This is a part of my VS Cobol II R1 Compile JCL.
000002 //STEP1 EXEC IGYWCL,
000003 // PARM.COBOL='LIB,APOST,XREF,MAP,OFFSET'
Can you please explain, What is LIB, MAP & OFFSET? What is the functions & need of them? Where Can I specify AMODE, SSRANGE, FLAG,RENT,RESIDENT etc compiler options? Can I specify with them (with LIB,APOST---) or with my actual compile procedure (IGYWCL)?


Answer:LIB,APOST,XREF... are basically compiler options.check this link which explains each compiler option in detail.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGYA1101/5.2.3?DT=19930312141355

For second part of the question as to where to specify these options, you can code them on the PARM statement or alternatively code in the program as follows.These should be the first lines (before the Identification division)

Code:

CBL SSRANGE,...


check this link for a detailed explanation of the CBL statement

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGYA1101/5.2.2.1?DT=19930312141355

Quote:

2. What is Language Environment? What's the use of it? Is it available with VS COBOL II Under s/390?

Language Environment, an element of both OS/390 and VM/ESA operating systems creates a single run-time environment for multiple high level languages including:
C/C++ ,COBOL ,PL/I and Fortran as well as Language Environment enabled assembler programs.

With a single run-time environment, incompatibilities between language specific run-time environments are eliminated. This means that your company's COBOL and C applications, for example, could communicate efficiently and easily together. In addition, your programmers, with various language skills, could work together to build applications with component programs written in a variety of languages. The end result is code that runs faster, is less prone to errors, and is easier to maintain.

Language Environment also combines essential run-times services, such as mathematical functions,storage management ,consistent condition handling and
date and time services ,all of these services are available through a set of interfaces that are consistent across programming platforms.

And since the library and callable interface are common, your applications behave consistently and predictably.

Quote:

3. Sir, What is Spanned file(S like V,F,FB,VB & U)? Can I use this file with VS cobol II? What is the JCL equivalent Recording format for that?
Can I specify RECORDING MODE clause in COBOL for VSAM files (my compiler ignores that)?


Answer: V,F,FB,VB & U are basically record formats.They are not spanned.Spanned records are in format S. A spanned record is a QSAM logical record that can be contained in one or more physical blocks. You can specify RECORDING MODE S for spanned records in QSAM files assigned to magnetic tape or to direct-access devices.


V - variable file
F - Fixed
FB - Fixed block file
VB - variable block file
U - Undefined file format

Check the following links for detailed explanation of the various recfm

Fixed-Length Records (Format F)

Variable-Length Records (Format V or D)

Undefined Records (Format U)

Spanned Records (Format S)

NO You don't have to specify the RECORDING mode for VSAM FILES

Quote:

4. Can I use EXTEND Mode with VSAM/RRDS & KSDS Files Under SEQUENTIAL Access?
Can I use SORT/MERGE With RELATIVE & INDEXED File under DYNAMIC Mode?


Answer:Yes you can use EXTEND mode with RRDS & KSDS files under sequential access .For an ESDS or RRDS file opened EXTEND, the added records are placed after the last existing records in the file.For a KSDS file opened EXTEND, each record you add must have a record key higher than the highest record in the file.

Quote:

5.What is USAGE IS POINTER? Can I use PIC clause with this? Can I Move a value & Accept & Display the Pointer contents? (please give an example)


Answer:Pointer data items can contain virtual storage addresses. You define them explicitly with the USAGE IS POINTER clause in the Data Division or implicitly as ADDRESS OF special registers.NO you cannot use a PIC clause with them.You cannot move a value to a pointer. But you can use a SET statement.

Check this link for detailed explanation of pointer

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGYL1101/2.7.12.5?SHELF=&DT=19930312093006

Quote:

6. Can I pass a VALUE (literal) to subprogram while call by content? (Ex: CALL "PGM01" BY CONTENT 4, BY REFERENCE A.)


Answer: No check this link for a better understanding of call statement

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGYL1101/3.4?DT=19930312093006

Quote:

7. What is the mean for VS in VS COBOL II? (VISUAL or VIRTUAL)


Answer: I beleive it is VIRTUAL but not sure

Quote:

8.What's COMP-4 & COMP-5 in VS COBOL II? How much storage occupied by each COMP-4/-5 Char? Is COMP-6 available in Mainframes?


Comp-4 is nothing but an equivalent of BINARY.It occupies the same storage as that of a comp item.Comp-5 and comp-6 are not available in VS COBOL II

If the pic clause conatains 1 through 4 digits then the stogatage occupied is 2 bytes (halfword)

If the pic clause conatains 5 through 9 digits then the stogatage occupied is 4 bytes (fullword)

If the pic clause conatains 10 through 18 digits then the stogatage occupied is 8 bytes (doubleword)

Quote:

9. Can I use COMP-1 & COMP-2 in my program? Can I initialize & accept it from console (yes, without PIC)? Please give me an example?
Can I use Floating points like: 01 AA PIC 9(1 VALUE IS 0.656E+02 . If not, how can I use floating points?

Answer:COMPUTATIONAL-1 and COMPUTATIONAL-2 items (internal floating-point) cannot have PICTURE strings.YOu can use a move statement to populate the values
Quote:

10. Can I use the variable in my pgm, which is declare as EXTERNAL in any batch program(not nested) running under the same TSO?
Can I access the GLOBAL Data declared in main program in my sub program(not passed via linkage section)?


Answer:The EXTERNAL clause specifies that the storage associated with a data item is associated with the run unit rather than with any particular program within the run unit. An external data itemcan be referenced by any program in the run unit that describes the data item.References to an external data item from different programs using separate descriptions of the data item are always to the same data item. In a run unit, there is only one representative of an external data item.

Yes you can access the GLOBAL Data declared in main program in my sub program(not passed via linkage section)?


Hope this helps...

cheers

kolusu

#14:  Author: mcmillan PostPosted: Sat Apr 05, 2003 12:48 pm
    —
Sir, Thank you somuch for your excellent help. Sir. I already have the books you specified. Please clarify my doubts.. please.


1. I Need a cobol SPECIAL-NAMES paragraph to change 'L' as Low-value & 'H' as high value. (DISPLAY HIGH-VALUES should print 'HHHHHH' )

2. I know about QSAM &amp; VSAM Files. What is SAM File?

3. I NEED to assign a VSAM/ESDS file for cobol seq organization. Let my jcl dd name is MAC.
Is it 'ASSIGN TO AS-MAC' or 'ASSIGN TO SEQUENTIAL-AS-MAC' in SELECT clause? Can I use any Label instead of SEQUENIAL? Is label must? What is the meaning of this AS?

4. Is any possibility of getting an Error code 98 in Cobol (IBM COBOL/ENTERPRISE COBOL)Program?

5. Can I use VS COBOL II in TPF? (and also in z/0S or z/OS.e)

6. I Can pass a file to suprogram. Where I declare the file data in subprogram (In File section or Linkage section). Can you please give me an exmple.
But I can use an external file in my suprogram. What is the difference b/w passing afile & using an external file in suprograms?

7. What is the output in mainframe under VS COBOL II? And why?
01 A PIC S9 VALUE -0. //(yes, negative zero)
01 B PIC S9 VALUE +0.
DISPLAY A, B.

Mcmillan


Last edited by mcmillan on Tue Jun 03, 2003 1:11 pm; edited 1 time in total

#15:  Author: sladeLocation: Edison, NJ USA PostPosted: Sun Apr 06, 2003 2:32 pm
    —
Hi Mac,

Kolusu is probably resting now, so I'll give it a try.

Quote:

1. I Need a cobol SPECIAL-NAMES paragraph to change 'L' as Low-value & 'H' as high value. (DISPLAY HIGH-VALUES should print 'HHHHHH' )

Sorry, but you can't do that. You don't say why you want to do that, so I can't give you a work around.
Quote:

2. I know about QSAM & VSAM Files. What is SAM File?

It just means "Sequential Access Method" and is used to reference ALL those kinds of files. E.g. QSAM, BSAM, etc. (no, not VSAM; the S in VSAM is for Storage.)
Quote:

3. I NEED to assign a VSAM/ESDS file for cobol seq organization. Let my jcl dd name is MAC.
Is it 'ASSIGN TO AS-MAC' or 'ASSIGN TO SEQUENTIAL-AS-MAC' in SELECT clause?
Can I use any Label instead of SEQUENIAL? Is label must? What is the meaning of this AS?

What version of COBOL are you using? Hyphenated assign clauses aren't used in later versions. Try using just "MAC". It should be OK.
Quote:

4. Is any possibility of getting an Error code 98 in Cobol (IBM COBOL/ENTERPRISE COBOL)Program?

Not yet. But who knows about the future?
Quote:

5. Can I use VS COBOL II in TPF? (and also in z/0S or z/OS.e)
6. I Can pass a file to suprogram. Where I declare the file data in subprogram (In File section or Linkage section). Can you please give me an exmple.
But I can use an external file in my suprogram. What is the difference b/w passing afile & using an external file in suprograms?

Can't say. I haven't used them.
Quote:

7. What is the output in mainframe under VS COBOL II? And why?
01 A PIC S9 VALUE -0. //(yes, negative zero)
01 B PIC S9 VALUE +0.
DISPLAY A, B.

I haven't done this either, but I do know that zero is a "positive" number. That is, when it's represented in a register, the high order bit of the register is a zero. That bit for negative numbers contains a 0ne.

Try it and let us know if 1) it passes the compiler's snicker test and 2) it will DIPLAY as the zero in "-20" DISPLAYs. BTW, do you have access to a computer? Sounds like you do.

#16:  Author: mcmillan PostPosted: Mon Apr 21, 2003 11:01 pm
    —
1. The internal storage of 01 A PIC 99 VALUE 23 is 'F2F3'. //In HEX
Like this what is the internal format of 01 B PIC X(5) VALUE "AaBbZ". (In HEX)

2. What is the deifference in the following JCL EXEC Statements?
a) //STEP1 EXEC PGM=MAC
b) //STEP1 EXEC MAC
When should I use a and when b ? Can I use PARM parameter with both?

#17:  Author: Glenn PostPosted: Tue Apr 22, 2003 12:27 am
    —
1) Get an EBCDIC chart.
2) Please look up the EXEC term in the JCL manuals linked to at the beginning of the site.

#18:  Author: kolusuLocation: San Jose PostPosted: Tue Apr 22, 2003 4:10 pm
    —
Macmillan,

Code:

1. The internal storage of 01 A PIC 99 VALUE 23 is 'F2F3'. //In HEX
Like this what is the internal format of 01 B PIC X(5) VALUE "AaBbZ". (In HEX)


Answer:C181C282E9
Code:

2.What is the deifference in the following JCL EXEC Statements?
a) //STEP1 EXEC PGM=MAC
b) //STEP1 EXEC MAC
When should I use a and when b ? Can I use PARM parameter with both?

Answer: 'a' is running a program MAC and 'b' is running a catalogued procedure named MAC.The PARM parameter is used to pass variable information to the program being executed in a job step.The processing program must contain instructions to retrieve the information and take advantage of it.PARM values are program-specific; that is, each program expects a different parm or possibly no parm at all.

For 'a' you can pass parms like this
Code:

//STEP01   EXEC PGM=MAC,                               
//             PARM=('MAP,SOURCE,OBJECT,NODECK,TERM,NOCMPR2')


For 'b' you can use parm but you need to specify the stepname in the procedure as shown below.
Code:

//STEP1 EXEC MAC,PARM.PS10=(ESD,TERM,NUM,STMT,DECK,OBJECT, 
//          NOMAP,NOLIST,'WORK=NOW')                         


In the above example we are execueting a catalgoued procedure MAC and we are passing values via parm for step PS10.

#19:  Author: mcmillan PostPosted: Thu Apr 24, 2003 4:13 am
    —
OK

Last edited by mcmillan on Tue Jun 03, 2003 1:14 pm; edited 1 time in total

#20:  Author: sladeLocation: Edison, NJ USA PostPosted: Thu Apr 24, 2003 3:39 pm
    —
Kolushu,

Are you experiencing discomfort in the ligaments in your knee? I get the distinct feeling that your leg is being pulled. Perhaps by someone in that "other" forum?

Regards, Jack.

#21:  Author: mcmillan PostPosted: Thu Apr 24, 2003 3:49 pm
    —
1. Can you please give me a sample JCL to compile an OS/VS COBOL program?

2. And a sample JCL to compile a IBM COBOL for OS/390 program?

3. And a sample JCL to compile a ENTERPRISE COBOL FOR Z/OS program?

4. And a sample JCL to compile a COBOL/370 program?

5. And a sample JCL to compile a C/390 program?

6. How many processors available in s/390 MP3000 &amp; G5?

7. What is the speed of s/390?

8. What is parallel Syplexing?

9. What is the maximum storage space can be used (Hard disk) with s/390?

10. What is VSAM string? Please give some details about that?

11. What is the name of the TSQ, which contains the formatted Dump of the abended CICS Program?

12. What is PDF in ISPF(Program development facility)? What is the advantage & functions of PDF?

13. Can I pass a VALUE (literal -instead of variable) to a subprogram while call by content?
Ex: CALL "PGM01" BY CONTENT 4.

PGM01 is a subpgm with PROCEDURE DIVISION USING A (a PIC 99 variable).

You previously answer as NO. But IBM manual said that pass by value is ok (only is BY CONTENT). Can you please check it for me in your terminal. (Sorry, My Proj Lead doesn't allow to write my own cobol program. He thinks, he knows everything. But he doesn't allow me to ask this type of questions, 'Cause he doesn't know the answer!!)

14. Can I use Language Environments in VS COBOL II?

15. Can I ACCEPT from SYSIN?
a) External Floating Point (ex: 01 A PIC 9V99E99)
b) Internal Floating Point (ex: 01 B USAGE COMP-1)
c) Pointer data item (ex: 01 C USAGE POINTER)

16. PROGRAM-ID. A.
...
PROGRAM-ID. B.
01 VARA PIC 9 GLOBAL.
END-PROGRAM. B.
PROGRAM-ID. C.
END-PROGRAM. C.
END-PROGRAM. A.
My question is Whether VARA is available in C. (C not contains B, but A contains B & C) Please don't tell to declare in PROGRAM A

17. Can I use '@' Symbol as my CURRENCY SIGN in VS COBOL II. (CURRENCY SIGN IS "@".) please remember @ is not in vs cobol II character set

18. Can I open a VSAM file in OUTPUT Mode if the file is already exist (in VS COBOL II). If I open that, whether the old contents are deleted or not. How can I DEFINE a VSAM file to be REUSABLE?


Last edited by mcmillan on Tue Jun 03, 2003 1:21 pm; edited 1 time in total

#22:  Author: CaptBillLocation: Pasadena, California, USA PostPosted: Thu Apr 24, 2003 4:11 pm
    —
mcmillan said:
Quote:
...have around one year experience in mainframe environment...
which indicated to me he works in the IT industry. But then he said:
Quote:
...have around one year experience in mainframe environment...
so I have no idea of his experience level. I think we have been misled.

#23:  Author: kolusuLocation: San Jose PostPosted: Thu Apr 24, 2003 5:32 pm
    —
Mcmillan,
Please do some homework. Usually I have lot of patience at answering questions.Every post of yours has atleast 10 questions in each post and by now I would have answered 50 questions just for you.Even after that you are not referring the manuals . From the latest questions you had questions 1 thru 5 can be found in the respective manuals.questions 6 thru 9 are not of concern to the programmer. As a matter of fact I myself am not bothered to find out the hardware details of the S/390.Unless your interest is being a systems programmer I do not see any purpose knowing the hardware stuff.I had answered the questions about ACCEPT at least 3 times and you still come with the same question every time.We are here to answer at our spare time. Rightnow I am swamped with so much work that I hardly have time to answer. Enough of my rant. Here are the answers

Code:
1. Can you please give me a sample JCL to compile an OS/VS COBOL program?

Answer: I don't have any sample JCL and even IBM does not have OS/VS COBOL Manuals online.

Code:
2.And a sample JCL to compile a IBM COBOL for OS/390 program?

Answer: check this link for a sample compile JCL
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGYA1101/5.1.1?DT=19930312141355

Code:
3.And a sample JCL to compile a ENTERPRISE COBOL FOR Z/OS program?

Answer: check this link for a sample compile JCL

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3PG00/2.1.1?DT=20011203125201

Code:
4.And a sample JCL to compile a COBOL/370 program?

Answer: Refer VS COBOL II compile JCL

Code:
5. And a sample JCL to compile a C/390 program?

Answer : check this link for compiling your C/C++ program

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZA500/C89?DT=20010110165657

Code:

6. How many processors available in s/390 MP3000 & G5?
7. What is the speed of s/390?


Answer: check the following link for detailed explanation of S/390

http://www-1.ibm.com/servers/s390/pes/

Check this link for S/390 G5 & G6 spec sheet

http://www-1.ibm.com/servers/eserver/zseries/library/specsheets/pdf/g2214221.pdf
Code:

8. What is parallel Syplexing?


Answer: Check this link for detailed explanation on parallel Syplexing

http://www-1.ibm.com/servers/eserver/zseries/pso/

Code:

9. What is the maximum storage space can be used (Hard disk) with s/390?


Answer: refer answer of question 6 & 7

Code:
10. What is VSAM string? Please give some details about that?


Answer: Strings (sometimes called place holders) are like cursors, each represents a position in the data set and are like holding your finger in a book to keep the place. The same ACB(Access Control Block) is used for all requests, and the data set needs to be opened only once. This means, for example, you could be processing a data set sequentially using one RPL(Request parameter list), and at the same time,using another RPL, directly access selected records from the same data set.

Keep in mind, though, that strings are not "owned" by the RPL any longer than the request holds position. Once a request gives up position (for example, with an ENDREQ), that string is free to be used by another request and must be repositioned in the data set by the user.
For each request, a string defines the set of control blocks for the exclusive use of one request. For example, if you use three RPLs, you should specify three strings. If the number of strings as needed by the concurrent requests for the ACB

For each request, a string defines the set of control blocks for the exclusive use of one request. For example, if you use three RPLs, you should specify three strings. If the number of strings you specify is not sufficient, and you are using NSR(Nonshared resources), the operating system dynamically extends the number of strings as needed by the concurrent requests for the ACB. Strings allocated by dynamic string addition are not necessarily in contiguous storage.

Dynamic string addition does not occur with LSR(Local shared resources) and GSR(Global shared resources). Instead, you get a logic error if you have more requests than available strings.The maximum number of strings that can be defined or added by the system is 255. Therefore, the maximum number of concurrent requests holding position in one data set at any one time is 255.

Code:

12. What is PDF in ISPF(Program development facility)? What is the advantage & functions of PDF?

Answer: PDF stands for Program Development Facility.An IBM licensed program used with ISPF to provide a work environment for the development of programs and the use of functions like Edit and Browse.Synonym for ISPF/PDF, Interactive System Productivity Facility/Program
Development Facility.

Code:
14. Can I use Language Environments in VS COBOL II?


Answer: YES

Code:

15. Can I ACCEPT from SYSIN?
a) External Floating Point (ex: 01 A PIC 9V99E99)
b) Internal Floating Point (ex: 01 B USAGE COMP-1)
c) Pointer data item (ex: 01 C USAGE POINTER)


Answer: You can ACCEPT any group item, or an elementary alphabetic, alphanumeric, alphanumeric-edited, numeric-edited or external decimal item..None of the items listed above match the condition.

Code:

16. PROGRAM-ID. A.
...
PROGRAM-ID. B.
01 VARA PIC 9 GLOBAL.
END-PROGRAM. B.
PROGRAM-ID. C.
END-PROGRAM. C.
END-PROGRAM. A.
My question is Whether VARA is available in C. (C not contains B, but A contains B & C) //Please don't tell to declare in PROGRAM A


Answer: NO

Code:

17. Can I use '@' Symbol as my CURRENCY SIGN in VS COBOL II. (CURRENCY SIGN IS "@".) //please remember @ is not in vs cobol II character set


Answer: Yes, but you need to specify that as special names.
ex:
Code:

SPECIAL-NAMES.             
    CURRENCY SIGN IS '@'. 

WORKING-STORAGE SECTION.               
                                       
01 A                   PIC @@@,@@9.   

Code:

18. Can I open a VSAM file in OUTPUT Mode if the file is already exist (in VS COBOL II). If I open that, whether the old contents are deleted or not.
How can I DEFINE a VSAM file to be REUSABLE?


Answer: To open a file that has never contained records (an empty file):

Use OPEN OUTPUT for ESDS files. Use OPEN OUTPUT or OPEN EXTEND for KSDS and RRDS files. (Either coding has the same effect.) If you have coded the file for random or dynamic access, you can also use OPEN I-O if the file is optional.

To open a file that already contains records (a loaded file):

Use OPEN INPUT, OPEN I-O, or OPEN EXTEND.For an ESDS or RRDS file opened EXTEND, the added records are placed after the last existing records in the file.For a KSDS file opened EXTEND, each record you add must have a record key higher than the highest record in the file.A file that once contained records, all of which have been deleted, can be opened as I-O or EXTEND.

Check the following JCL to define a vsam cluster to be reusable.

Code:

//STEP1    EXEC  PGM=IDCAMS
//SYSPRINT DD    SYSOUT=A
//SYSIN    DD    *
     DEFINE CLUSTER -
            (NAME(EXAMPLE.ESDS2) -
            RECORDSIZE(2500 3000) -
            SPANNED -
            VOLUMES(VSER03) -
            CYLINDERS(2 1) -
            NONINDEXED -
            REUSE -
            MASTERPW(ESD2MRPW) -
            UPDATEPW(ESD2UPPW)  ) -           
       CATALOG(RSTUCAT2/USERMRPW)
/*



Hope this helps...

cheers

kolusu

Slade: If this is indeed is cheap leg pulling trick from someone on the other board then I would just ignore them.

#24:  Author: sladeLocation: Edison, NJ USA PostPosted: Thu Apr 24, 2003 11:16 pm
    —
Kolusu: If this is indeed NOT a cheap leg pulling trick from someone on the other board then I would hope you get an "A". Mr. Green

#25:  Author: mcmillan PostPosted: Sat Apr 26, 2003 8:34 pm
    —
What is the difference between EXEC PGM=IDKR and //step10 EXEC IDKR

thank u


Last edited by mcmillan on Tue Jun 03, 2003 1:28 pm; edited 1 time in total

#26:  Author: RanjishLocation: Chennai PostPosted: Sun Apr 27, 2003 9:31 am
    —
Mcmillan,

For the question you have asked, the answer can be found in every basic JCL book. Please ask questions after referring some books and if you dont find the answer enywhere.

Anyway, I will answer this for you.

EXEC PGM=IDKR
This means that you are executing a program with the name IDKR.
You can pass the values for the program thru PARM keyword.

EXEC IDKR

This means that IDKR is a PROC. The proc will be having some steps.
You can directly pass the values to the proc.

eg:

//step10 EXEC IDKR,
// parm1=value1,
// parm2=value2

These values can be referred in the PROC.

Please read a JCL book regarding the PROCs.

cheers
Ranjish

#27:  Author: kolusuLocation: San Jose PostPosted: Sun Apr 27, 2003 11:31 am
    —
Mcmillan,

Please read the answers. I had answered the last question of yours on 22 Apr 2003 04:10 pm,Post no: 507.Please for god's sake don't keep posting questions which are already answered.

Ranjish: you are partially correct, but the parms you are trying to pass to the proc are the symbolic parameters. check my post no: 507 for explanation on passing parms to the proc.

Thanks

Kolusu

#28:  Author: Siva PostPosted: Mon Apr 28, 2003 8:52 am
    —
kolusu, I salute your Patience..

#29:  Author: RanjishLocation: Chennai PostPosted: Tue Apr 29, 2003 12:51 am
    —
Kolusu,

Thanks for correcting me.
I have a small doubt. How can I search by post number? I tried to find out the post nuber 507. But was unsuccessful.

thanks
Ranjish

#30:  Author: kolusuLocation: San Jose PostPosted: Tue Apr 29, 2003 6:12 am
    —
Ranjish,

My post no 507 is just a couple of posts above in the same topic.It is the 18th post in this topic.Right now this board does not have the feature of searching the posts by relative number.sorry about that.

Kolusu

#31:  Author: mcmillan PostPosted: Tue Apr 29, 2003 12:38 pm
    —
Thnk you for all your help sir I will give you a gift in a week

Last edited by mcmillan on Tue Jun 03, 2003 1:31 pm; edited 1 time in total

#32:  Author: sp_shukla PostPosted: Wed Apr 30, 2003 7:36 pm
    —
mcmillan,

You are scaring us !!!! Very Happy

by the way do let us know about the result of your exam. Wink

SP

#33:  Author: sladeLocation: Edison, NJ USA PostPosted: Fri May 02, 2003 12:19 pm
    —
Kolusu (Master),

Don't you dare start calling Mc Millan "Grasshopper". Mr. Green

#34:  Author: CaptBillLocation: Pasadena, California, USA PostPosted: Fri May 02, 2003 2:04 pm
    —
I wonder what the morning of May 6 will bring as Kolusu's "gift".

#35:  Author: sladeLocation: Edison, NJ USA PostPosted: Wed May 07, 2003 4:59 pm
    —
It's 6 PM on May 7. I don't FEEL any different.

#36:  Author: CaptBillLocation: Pasadena, California, USA PostPosted: Thu May 08, 2003 3:58 pm
    —
Today is May 8. I wonder if kolusu got any gifts?

Maybe he'll let us know! Mr. Green

#37:  Author: kolusuLocation: San Jose PostPosted: Thu May 08, 2003 4:47 pm
    —
Captbill,

I did not receive any gift and as matter of fact I don't accept gifts. I guess mcmillan was happy to pass the test and may be he will come back for his next exam.

Kolusu

#38:  Author: sladeLocation: Edison, NJ USA PostPosted: Sun May 18, 2003 4:56 pm
    —
It is now 6:45 PM, EST on May 18, 2003. McMillan's gift deadline has long come and gone. But, perhaps this quote from his first post foretold just what that gift might be:

Quote:

What is the output when displaying an item having low-value ....

#39:  Author: PremkumarLocation: Chennai, India PostPosted: Sun May 18, 2003 10:32 pm
    —
Probably, mcmillan meant his disappearance as the gift! Laughing

#40:  Author: HimeshLocation: Chicago PostPosted: Tue May 20, 2003 2:03 pm
    —
Maybe we could dedicate this post to mcmillan and rename the post as Fond(!) reminiscences of the late(?) mcmillan

Rolling Eyes

#41:  Author: manojagrawal PostPosted: Wed May 21, 2003 12:39 am
    —
WOW!!!!

Just finished reading this Posting!!! Kolusu - Sir - Master, you sure do have a lot of patience.

Well as far as Forums are concerned, MVSFORUMS is just GREAT!!!! I did have a look at a few forums when i first seached for them, and i havent gone thru any of them properly, so i dont know the kinda posts we have there. But what attracted me to MVSFORUMS is the Look and Feel!!!

Regards
Manoj.

PS: Kolusu, its May 21st, 2003. Any updates on your gift? Mr. Green

#42:  Author: kolusuLocation: San Jose PostPosted: Wed May 21, 2003 3:50 am
    —
Manoj,

Thanks for the positive feed back about mvsforums. We are trying to make this site as user friendly as possible and I am glad that you liked it.

Btw I prefer not to be reffered as sir- master. I am just helping others with little knowledge I have, and in the process I am learning a lot.

As stated earlier I don't like gifts and as some of members pointed out , mcmillan's disappearance is the gift.May be he will come back when he has his next exam.

Thanks

Kolusu

#43:  Author: RanjishLocation: Chennai PostPosted: Tue Jun 03, 2003 8:35 am
    —
Oh No......they are trying to make an exact replica. Too bad...but its not a good way to ask questions in one forum and be an admin in another.

#44:  Author: sladeLocation: Edison, NJ USA PostPosted: Tue Jun 03, 2003 12:27 pm
    —
That joker Mcmillan (or whatever his real name is; he doesn't have the guts to use it) is beneath contempt. I don't know what his motive was in asking those time consuming questions, but to take advantage of Kolusu's kindness for his own selfish or trivial reasons is despicable.

I hope his new website experiences the success it deserves.

Jack.

#45:  Author: CaptBillLocation: Pasadena, California, USA PostPosted: Wed Jun 04, 2003 10:40 am
    —
How about we all go to mcmillan's board, register with our same names as here, then ask really stupid questions such as "Why is the sky blue?" and then have someone answer "Because it's boyfriend broke up with it." or some such nonsense?

All in favor say Aye.
All opposed say Nay.

#46:  Author: sladeLocation: Edison, NJ USA PostPosted: Wed Jun 04, 2003 2:58 pm
    —
Aye!!!

#47:  Author: krk123 PostPosted: Wed Jun 04, 2003 3:54 pm
    —
Aye!!

#48:  Author: manojagrawal PostPosted: Thu Jun 05, 2003 12:18 am
    —
NAY!!!

Thats wrong to do! I agree He came, bugged us like anything (rather bugged Kolusu) and has now gone!!!! Why do you wanna start something like this, which will only continue getting worse!!!! Think about it before you say Aye.

#49:  Author: HimeshLocation: Chicago PostPosted: Fri Jun 06, 2003 3:01 am
    —
It looks like "mcmillan" has edited all his famous posts (the ones with "Pls pls sir/i cannot check this on my computer/they do not allow me to check this etc...etc..) and replaced it with "nicer" ones.

Any guesses? Rolling Eyes

regards,
himesh

#50:  Author: DibakarLocation: USA PostPosted: Fri Jun 06, 2003 5:51 am
    —
NAY!

It will probably give him publicity.

BTW, have you noticed his avatar is also a copied from Kolusu. Why would somebody do this when apparently he is capable of doing things differently.

#51:  Author: sladeLocation: Edison, NJ USA PostPosted: Fri Jun 06, 2003 1:30 pm
    —
Quote:

Why would somebody do this when apparently he is capable of doing things differently.

I don't know, Dibakar; I've never studied Abnormal Psychology.

Regards, Jack.

#52:  Author: RanjishLocation: Chennai PostPosted: Mon Jun 09, 2003 10:52 am
    —
I dont understand why venx had edited the post and removed the site address.

#53:  Author: MervynLocation: Hove, England PostPosted: Mon Jun 09, 2003 12:33 pm
    —
I think it's about etiquette. If you're in a forum, you shouldn't advertise a 'competitor'.

#54:  Author: KathiLocation: Mission Viejo, California PostPosted: Thu Jun 12, 2003 7:09 pm
    —
CaptBill,

I can understand your feeling that way, but it's better if you just do nothing.

Venx_76,

Sometimes it's fun to play in the mud! Weren't you ever a child? Smile

#55:  Author: coolmanLocation: US PostPosted: Fri Jun 13, 2003 12:24 am
    —
I normally don't look into this section of the forum. Im not able to find the questions for which Kolusu and co. had given answers.
Its also my humble request to ignore people like McMillan. . Let this be the last post for this thread. Mr. Green

#56:  Author: dalaly PostPosted: Fri Jun 13, 2003 10:35 am
    —
Hello all,

I know it has been a fun thread but I agree with coolman and will be locking this thread.

Best regards,

-dalaly Wink



MVSFORUMS.com -> Application Programming


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group