0

In JCL, How do I add "0" padding to a string so that my string length is always 10? I am using TSSUtil v3 tool for jcl.

If input "10541", 5 padding is added = 0000010541
Mayur Pawar
  • 1
  • 1
  • 1
  • 1
    You don't. JCL does nothing beyond allowing a program to run with what it needs. You probably mean "how can I do it with TSSUTIL Control Cards?". The number of Mainframers here is limited. The number who have worked in security are probably severely limited. Have you looked at the manuals? Talked to colleagues/your support? Checked to see if CA has a web-community that you just have to register for and ask away? – Bill Woodger Sep 30 '15 at 06:08
  • https://support.ca.com/cadocs/0/CA%20Top%20Secret%20for%20z%20VM%20r12%20SP3-z%20VM-ENU/Bookshelf_Files/HTML/TSS_Report_zVM_ENU/index.htm?toc.htm?649855.html – Bill Woodger Sep 30 '15 at 06:11
  • One option might be to use Rexx / ISPF panels/skelton generation to generate your job. Rexx can certainly 'pad' strings – Bruce Martin Sep 30 '15 at 08:49

1 Answers1

1

Here's how you would do it with your SORT product, if you can't get a solution with TSSUTIL:

//STEP001  EXEC PGM=SORT                           
//SORTIN DD *                                      
24567                                              
1456                                              
47865                                              
24875                                              
1                                              
//SORTOUT DD SYSOUT=*                              
//SYSIN DD *                                       
  OPTION COPY                                      
  INREC BUILD=(1,10,UFF,M11,LENGTH=10)             
//SYSOUT DD SYSOUT=* 

Output

0000024567
0000001456
0000047865
0000024875
0000000001
Bill Woodger
  • 12,968
  • 4
  • 38
  • 47