Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code examples 1

Status
Not open for further replies.

StephenJSpiro

Programmer
Jul 10, 2001
143
US
PLEASE
When you give us an example of your code, COPY and PASTE.

If you retype it, and you mis-spell a text item, or you leave out a PICTURE, or you leave out punctuation, or do something else that is not EXACTLY as you have it in your program, we CANNOT tell what might be contributing to your problem!

People are very generous with their time in here; please make it easier on them!

Stephen J Spiro
Member, J4 COBOL Standards Committee
check it out at

stephenjspiro at hotmail.com
 
Hi!

Good advise, mostly a program isn't that secret. An adder information that can be useful is in what environment you compile/run your application, the solution of many problems is depnding on the environment.

//Renaldini
 
A person can copy and paste their program code into the text editor here -- and then go in and change the names of a few data fields if that is necessary to protect company secrets. But as Stephen says, watch for typing mistakes.

Nina Too
 
My too scents: In addition to this advice begin/end your code with "code tags". To see how to use them press "preview post" button at bottom of "your reply" text box. Then go to bottom of the new page for instuctions on how to do it.

This aligns the code as it appears in the originating cut document. Makes things a lor easier to read. The following ex. does not include the letters "code" between the brackets, preceeded by "/" at the end of the c&p code, otherwise the letters won't display in the ex.

[]
******************************************************************
* DETERMINE CENTURY FOR DAYLIGHT SAVINGS START/END DATES
******************************************************************
MOVE STD-B1-MESSAGE-DATE TO WS-IT-DATE
MOVE WS-YY TO WDS-YY
IF WDS-YY < 90
ADD +1 TO WDS-CC
END-IF
MOVE WDS-CCYY TO WDE-CCYY
[/]

The following shows the same c&p code using the real code tags. Note: they don't display (that's how you can tell if you did it right) and the alignment is exactly as it was in the orig c&p code. The IF isn't indented - I was in an experimental phase back then.
Also don't worry how the code looks in the text window; when you see it in the posting, it'll look OK.

HTH, Jack.

Code:
      ******************************************************************
      *  DETERMINE  CENTURY FOR DAYLIGHT SAVINGS START/END DATES
      ******************************************************************
           MOVE    STD-B1-MESSAGE-DATE  TO  WS-IT-DATE
           MOVE    WS-YY                TO  WDS-YY
           IF      WDS-YY                <  90
           ADD       +1                 TO  WDS-CC
           END-IF
           MOVE    WDS-CCYY             TO  WDE-CCYY



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top