Tip

Changing SEU length to 112

This program converts the SOURCE entry utility length to 112 so that the comments field is also visible while entering the SOURCE.


 		0000.02
/********************************************************************/  
0000.03 /*
*/  
0000.04 /*     THIS PROGRAM CONVERTS THE SOURCE ENTRY UTILITY LENGTH
*/  
0000.05 /*      TO 112 SO THAT THE COMMENTS FIELD IS ALSO VISIBLE
*/  
0000.06 /*                WHILE ENTERING THE SOURCE
*/  
0000.07 /*
*/  
0000.08
/********************************************************************/  
0000.09

0001.00              PGM        PARM(&LIB) /* Accept the LIBRARY where the +

0001.01                           changes have to be made as the Input. */

0002.00

0002.01              /* Existing File SRCPF in the Library PRAVIN */

0003.00              DCLF       FILE(PRAVIN/SRCPF)

0003.03

0004.00              DCL        VAR(&LIB) TYPE(*CHAR) LEN(10)

0005.00

0006.00              DLTF       FILE(PRAVIN/SRCPF)

0007.00              MONMSG     MSGID(CPF9999)

0007.01                                 0008.00              DLTF
FILE(TMPSRCPF)                                  
0009.00              MONMSG     MSGID(CPF9999)

0010.00

0011.00              DSPFD      FILE(&LIB/*ALL) TYPE(*BASATR) +

0012.00                           OUTPUT(*OUTFILE) FILEATR(*PF) +

0013.00                           OUTFILE(PRAVIN/SRCPF)

0014.00

0015.00  READ:       RCVF       RCDFMT(QWHFDBAS)

0016.00               MONMSG     MSGID(CPF0864) EXEC(GOTO CMDLBL(END))

0017.00

0018.00               IF         COND((&ATDTAT *EQ 'S') *AND (&ATFTYP *EQ +

0019.00                            'P')) THEN(DO)

0020.00               RNMOBJ     OBJ(&ATLIB/&ATFILE) OBJTYPE(*FILE) +

0021.00                            NEWOBJ(TMPSRCPF) /* Rename the Exisiting
+   
0022.00                            Source File */

0023.00

0024.00               CRTSRCPF   FILE(&ATLIB/&ATFILE) RCDLEN(112) +

0025.00                            TEXT(&ATTXT) /* Create a Source file with
+  
0026.00                            length 112 */

0027.00

0028.00               CPYSRCF    FROMFILE(TMPSRCPF) TOFILE(&ATLIB/&ATFILE) +
0029.00                            FROMMBR(*ALL) MBROPT(*ADD) /* Copying all
+  
0030.00                            the member from renamed source file to +

0031.00                            newly created file */

0033.00

0034.00              MONMSG     MSGID(CPF2817) /* Error while copying empty
+   
0035.00                           member */

0036.00

0037.00              DLTF       FILE(TMPSRCPF) /* Delete the renamed file */

0038.00

0039.00              ENDDO      /* LOOP FOR SOURCE FILE */

0040.00

0041.00              GOTO       CMDLBL(READ) /* Loop for Reading the Next +

0042.00                           Record */

0043.00  END:

0044.00              SNDPGMMSG  MSG('Completed
Normally................]')      
0045.00              ENDPGM

        ****************** End of data ************************ 

This was first published in May 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.