Skip to main content

Creating the Source Data Set with EDIT

READY                               (call EDIT to create source data set)
edit sample new fortg
INPUT (for "new" data set, EDIT enters INPUT mode automatically)
00010 // exec fortgcl (in INPUT mode,
00020 c a sample fortran program EDIT types out line numbers,
00030 c user enters lines.)
00040 1 format(' enter a')
00050 2 format(' the square root of',f10.3,' is',f10.3)
00060 3 format(f10.3)
00070 100 write(6,1) (Specifying "fortg" in
00080 read(5,3) a edit command sets logical tabs
00090 b=sqrt(a) correctly for Fortran)
00100 write(6,2) a, b
00110 go to 100
00120 end
00130 /*
00140 //lked.syslmod dd disp=new,dsn=abc132.uid.load(root)
00150 (Null line leaves INPUT mode)
verify ("verify" causes changed line to be displayed)
change 140 /new/old/
00140 //LKED.SYSLMOD DD DISP=OLD,DSN=ABC123.UID.LOAD(ROOT)
list
00010 // EXEC FORTGCL
00020 C A SAMPLE FORTRAN PROGRAM
00030 C

00040 1 FORMAT(' ENTER A')
00050 2 FORMAT(' THE SQUARE ROOT OF',F10.3,' IS',F10.3)
00060 3 FORMAT(F10.3)
00070 100 WRITE(6,1)
00080 READ(5,3) A
00090 B=SQRT(A)
00100 WRITE(6,2) A, B
00110 GO TO 100
00120 END
00130 /*
00140 //LKED.SYSLMOD DD DISP=OLD,DSN=ABC132.UID.LOAD(ROOT)
END OF DATA
save (Make permanent copy of source file)
SAVED
end (Leave EDIT)