Saturday, 11 May 2013

Difference between NEXT SENTENCE and CONTINUE......

NEXT SENTENCE: THE SENTENCE IS COLLECTION OF STATEMENTS AND IS ALWAYS END WITH PERIODE (.)
SO NEXT SENTENCE MEANS THE CONTROL PASSES TO NEXT SENTENCE AFTER THE PERIODE.
CONTINUE:- TRANSFER THE CONTROL AFTER THE END SCOPE TERMINATOR, MEANS CONTINOUS THE EXCUTION NOT CHECK THE CONDITION.


IF A>B
IF A>C
DISPLAY ‘A’
NEXT SENTENCE
END-IF
DISPLAY ‘C’
END-IF.
DISPLAY ‘B’.


If A=10, B=5, C=7.

ans : A B  

Which DIVISION is mandatory in a program in COBOL...?

COBOL can get executed even if there is no divisions except ID DIVISION.

IDENTIFICATION DIVISION.
PROGRAM-ID. PROG001.

 just execute this above two lines you would get the program executed without showing any error or abend.


Friday, 10 May 2013

calculations in COBOL...

WORKING-STORAGE SECTION.
01 A                        PIC 99V0 VALUE 5.
01 B                        PIC 9V9 VALUE 6.
01 C                        PIC 99V9 VALUE 2.8.
01 D                        PIC 99 VALUE 3.

PROCEDURE DIVISION.
COMPUTE A ROUNDED B C = A + B * C / D.
STOP RUN.


ANS:

A = 11, B = 0.6, C = 10.6.

A job has 90 steps i want to execute only step7 and step15....?



In the jobcard, Give restart=step7, code cond=(0,le) from
step8 - step14, Give a null stmt(//) after step15. That's
it your requirement is met.

Simplest way:
There is an utility IEBEDIT which is used to execute only
few particular steps from 'n' steps in a jcl.

//JOBCARD
//STEPNAME EXEC PGM=IEBEDIT
//SYSUT1 DD DSN=MYPRGM.DSN,DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSIN DD *
EDIT TYPE=INCLUDE STEPNAME=(STEP7,STEP15)
/*
//

MYPRGM.DSN = The name of the dataset that has the actual
JCL.

what is the max length of PARM used in jcl..?

100 is the max length that can be used in PARM...in jcl

here 98-characters and 2-byte for passing length....

eg:

// JOB CARD....
//STEP1 EXEC PGM=IGYWCL,PARM='this is the place where the parameters can b
e passed....................****'
//
//

How can we increment subscript and index....?



SUBCRIPT:
CAN BE INCREMENT OR DECREMENT USING ARITHMETIC OPERATIONS
INDEX:
CAN BE INCREMENT OR DECREMENT USING SET VERB

How to override a dsn that is contained in a proc called by another proc...?



//PROC1 PROC
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=XYZ, DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// PEND

//JJJ JCLLIB ORDER=PROCLIB PATH
//PROC2 PROC
//STEP2 EXEC PROC1

//JOBNAME JOB PARAMETERS
//JJJ JCLLIB ORDER=PROCLIB PATH
//PROC3 PROC
//STEP2.DD1 DSN=NEW NAME,DISP=SHR

THIS IS D WAY....
THIS PROG. WILL DO NOTHING IT'S JUST AN EXAMPLE

Expense Handler Application with advance technologies

Budget Planner  One of the application developed with Ionic 4 and Python-Flask.  Ionic 4 code:  https://github.com/logeshbuiltin/Expense...